From: tjhunt Date: Wed, 10 Sep 2008 02:44:21 +0000 (+0000) Subject: MDL-7010 - followup - quiz config settings were referred to in two places in the... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=0cd465770f75fe8f57528c362621c5774c2b2035;p=moodle.git MDL-7010 - followup - quiz config settings were referred to in two places in the question bank. Since these settings are now in config_plugins, the references need to be update. (Of course, perhaps these should not be referred to at all ...) --- diff --git a/question/format.php b/question/format.php index b5066ce8de..a4108c64e0 100644 --- a/question/format.php +++ b/question/format.php @@ -485,9 +485,13 @@ class qformat_default { */ function defaultquestion() { global $CFG; + static $defaultshuffleanswers = null; + if (is_null($defaultshuffleanswers)) { + $defaultshuffleanswers = get_config('quiz', 'shuffleanswers'); + } $question = new stdClass(); - $question->shuffleanswers = $CFG->quiz_shuffleanswers; + $question->shuffleanswers = $defaultshuffleanswers; $question->defaultgrade = 1; $question->image = ""; $question->usecase = 0; diff --git a/question/preview.php b/question/preview.php index db46d516da..894295ace7 100644 --- a/question/preview.php +++ b/question/preview.php @@ -65,7 +65,7 @@ if (empty($quizid)) { $quiz = new cmoptions; $quiz->id = 0; - $quiz->review = $CFG->quiz_review; + $quiz->review = get_config('quiz', 'review'); require_login($courseid, false); $quiz->course = $courseid; $context = get_context_instance(CONTEXT_COURSE, $courseid);