Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

MDL-35794 quiz: config for whether Outcomes are advanced settings

  • Loading branch information...
commit e349d184358000bcb137516fb6a7fafe01657b16 1 parent 4a76321
dtle dtle authored timhunt committed
2  mod/quiz/lang/en/quiz.php
@@ -165,6 +165,7 @@
165 165 $string['configmaximumgrade'] = 'The default grade that the quiz grade is scaled to be out of.';
166 166 $string['confignewpageevery'] = 'When adding questions to the quiz page breaks will automatically be inserted according to the setting you choose here.';
167 167 $string['confignavmethod'] = 'In Free navigation, questions may be answered in any order using navigation. In Sequential, questions must be answered in strict sequence.';
  168 +$string['configoutcomesadvanced'] = 'If this option is turned on, then the Outcomes on the quiz editing form are advanced settings.';
168 169 $string['configpenaltyscheme'] = 'Penalty subtracted for each wrong response in adaptive mode.';
169 170 $string['configpopup'] = 'Force the attempt to open in a popup window, and use JavaScript tricks to try to restrict copy and paste, etc. during quiz attempts.';
170 171 $string['configrequirepassword'] = 'Students must enter this password before they can attempt the quiz.';
@@ -517,6 +518,7 @@
517 518 To arrange the questions over a number of pages, click the Repaginate button and select the desired number of questions per page.';
518 519 $string['orderingquiz'] = 'Order and paging';
519 520 $string['orderingquizx'] = 'Order and paging: {$a}';
  521 +$string['outcomesadvanced'] = 'Outcomes are advanced settings';
520 522 $string['outof'] = '{$a->grade} out of a maximum of {$a->maxgrade}';
521 523 $string['outofpercent'] = '{$a->grade} out of a maximum of {$a->maxgrade} ({$a->percent}%)';
522 524 $string['outofshort'] = '{$a->grade}/{$a->maxgrade}';
3  mod/quiz/mod_form.php
@@ -378,6 +378,9 @@ protected function definition() {
378 378 // -------------------------------------------------------------------------------
379 379 $this->standard_coursemodule_elements();
380 380
  381 + // Check and act on whether setting outcomes is considered an advanced setting.
  382 + $mform->setAdvanced('modoutcomes', !empty($quizconfig->outcomes_adv));
  383 +
381 384 // -------------------------------------------------------------------------------
382 385 $this->add_action_buttons();
383 386 }
7 mod/quiz/settings.php
@@ -193,6 +193,13 @@
193 193 get_string('showinsecurepopup', 'quiz'), get_string('configpopup', 'quiz'),
194 194 array('value' => '-', 'adv' => true), null));
195 195
  196 +// Allow user to specify if setting outcomes is an advanced setting
  197 +if (!empty($CFG->enableoutcomes)) {
  198 + $quizsettings->add(new admin_setting_configcheckbox('quiz/outcomes_adv',
  199 + get_string('outcomesadvanced', 'quiz'), get_string('configoutcomesadvanced', 'quiz'),
  200 + '0'));
  201 +}
  202 +
196 203 // Now, depending on whether any reports have their own settings page, add
197 204 // the quiz setting page to the appropriate place in the tree.
198 205 if (empty($reportsbyname)) {

0 comments on commit e349d18

Please sign in to comment.
Something went wrong with that request. Please try again.