From ace1bf9d8ec9fcf6eae0e9d1f996f08a8397ac3b Mon Sep 17 00:00:00 2001 From: tjhunt Date: Fri, 14 Sep 2007 09:33:30 +0000 Subject: [PATCH] MDL-11284 - Can't save edited questions --- question/type/questiontype.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/question/type/questiontype.php b/question/type/questiontype.php index c5f5755b1e..4859b4a429 100644 --- a/question/type/questiontype.php +++ b/question/type/questiontype.php @@ -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); -- 2.39.5