]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-11284 - Can't save edited questions
authortjhunt <tjhunt>
Fri, 14 Sep 2007 09:33:30 +0000 (09:33 +0000)
committertjhunt <tjhunt>
Fri, 14 Sep 2007 09:33:30 +0000 (09:33 +0000)
question/type/questiontype.php

index c5f5755b1e72158dfa7423a6b93bf2716238166d..4859b4a429a8a040a31b09625ae7ee59ab24ab21 100644 (file)
@@ -273,12 +273,12 @@ class default_questiontype {
             if (isset($form->categorymoveto)){
                 question_require_capability_on($question, 'move');
                 list($question->categorymoveto, $movetocontextid) = explode(',', $form->categorymoveto);
-            }
-            //don't need to test add permission of category we are moving question to.
-            //Only categories that we have permission to add
-            //a question to will get through the form cleaning code for the select box.
-            if (isset($question->qtype) && $question->qtype != RANDOM){
-                $question->category = $question->categorymoveto;
+                //don't need to test add permission of category we are moving question to.
+                //Only categories that we have permission to add
+                //a question to will get through the form cleaning code for the select box.
+                if (isset($question->qtype) && $question->qtype != RANDOM){
+                    $question->category = $question->categorymoveto;
+                }
             }
             // keep existing unique stamp code
             $question->stamp = get_field('question', 'stamp', 'id', $question->id);