Merge branch 'MDL-61514-master' of git://github.com/rezaies/moodle

This commit is contained in:
Jun Pataleta 2018-03-22 10:52:53 +08:00
commit edf88a3bb3
2 changed files with 3 additions and 3 deletions

View File

@ -251,7 +251,7 @@ class restore_quiz_activity_structure_step extends restore_questions_activity_st
}
protected function process_quiz_question_instance($data) {
global $DB;
global $CFG, $DB;
$data = (object)$data;
@ -302,6 +302,8 @@ class restore_quiz_activity_structure_step extends restore_questions_activity_st
}
if (isset($data->tags)) {
require_once($CFG->dirroot . '/mod/quiz/locallib.php');
$tags = quiz_extract_random_question_tags($data->tags, $this->task->is_samesite());
$data->tags = quiz_build_random_question_tag_json($tags);
}

View File

@ -23,8 +23,6 @@
*/
defined('MOODLE_INTERNAL') || die();
global $CFG;
require_once($CFG->dirroot . '/mod/quiz/locallib.php');
/**
* Class mod_quiz_tags_testcase