]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-7010 - followup - quiz config settings were referred to in two places in the...
authortjhunt <tjhunt>
Wed, 10 Sep 2008 02:44:21 +0000 (02:44 +0000)
committertjhunt <tjhunt>
Wed, 10 Sep 2008 02:44:21 +0000 (02:44 +0000)
question/format.php
question/preview.php

index b5066ce8defecb82929cc5ac00436868d6eb0e00..a4108c64e0c34cad454cd323807ec931a5f69954 100644 (file)
@@ -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;
index db46d516da27b425dce5348c61a2b8ab10e00189..894295ace7fa5fb83b5b663a0be633cb242ec598 100644 (file)
@@ -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);