Index: app/controllers/assignments_controller.rb
===================================================================
--- app/controllers/assignments_controller.rb	(revision 1196)
+++ app/controllers/assignments_controller.rb	(working copy)
@@ -105,7 +105,7 @@
     
     if !request.post?
       # set default value if web submits are allowed
-      @assignment.allow_web_submits = markus_config_repository_external_submits_only?
+      @assignment.allow_web_submits = !MarkusConfigurator.markus_config_repository_external_submits_only?
       render :action => 'new'
       return
     end   
Index: test/functional/assignments_controller_test.rb
===================================================================
--- test/functional/assignments_controller_test.rb	(revision 1196)
+++ test/functional/assignments_controller_test.rb	(working copy)
@@ -45,10 +45,30 @@
       setup do
         post_as @admin, :new, :id => @assignment.id
       end
-      
       should_assign_to :assignment, :assignments
       should_respond_with :success
     end
+
+    context "with REPOSITORY_EXTERNAL_SUBMITS_ONLY as false" do
+      setup do
+        MarkusConfigurator.stubs(:markus_config_repository_external_submits_only?).returns(false)
+        get_as @admin, :new
+      end
+      should "set allow_web_submits accordingly" do
+        assert assigns(:assignment).allow_web_submits
+      end      
+    end
+
+    context "with REPOSITORY_EXTERNAL_SUBMITS_ONLY as true" do
+      setup do
+        MarkusConfigurator.stubs(:markus_config_repository_external_submits_only?).returns(true)
+        get_as @admin, :new
+      end
+      should "set allow_web_submits accordingly" do
+        assert !assigns(:assignment).allow_web_submits
+      end      
+    end
+
     
   end # context: A logged in admin doing a GET
   

