Index: editlib.php =================================================================== RCS file: /cvsroot/moodle/moodle/question/editlib.php,v retrieving revision 1.76 diff -u -r1.76 editlib.php --- editlib.php 3 Oct 2007 04:42:57 -0000 1.76 +++ editlib.php 6 Oct 2007 03:54:42 -0000 @@ -412,7 +412,7 @@ } function question_showbank_actions($pageurl, $cm){ - global $CFG, $COURSE; + global $CFG, $COURSE, $QTYPES; /// Now, check for commands on this page and modify variables as necessary if (isset($_REQUEST['move']) and confirm_sesskey()) { /// Move selected questions to new category $category = required_param('category', PARAM_SEQUENCE); @@ -446,9 +446,8 @@ } $returnurl = $pageurl->out(false, array('category'=>"$tocategoryid,$contextid")); if (!$checkforfiles){ - foreach ($questionids as $questionid){ - //move question - if (!set_field('question', 'category', $tocategory->id, 'id', $questionid)) { + foreach ($questions as $question){ + if(! $QTYPES[$question->qtype]->move_question_to_category($question, $tocategoryid)){ error('Could not update category field'); } }