MDL-10899 - There is some data associated with some questons that needs to be udpated when moving questions between categories. This commit deals with subquestions, and lays the foundation for fixing the other problem - datasets - which is files as bug 14767.

This commit is contained in:
tjhunt
2008-05-09 15:05:36 +00:00
parent 08121fadcb
commit 7fb1b88dc7
5 changed files with 34 additions and 10 deletions
+2 -5
View File
@@ -447,11 +447,8 @@ function question_showbank_actions($pageurl, $cm){
}
$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)) {
error('Could not update category field');
}
if (!question_move_questions_to_category(implode(',', $questionids), $tocategory->id)) {
print_error('errormovingquestions', 'question', $returnurl, $questionids);
}
redirect($returnurl);
} else {