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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user