dirroot/mod/quiz/locallib.php"); // Ensure that all form variables are initialized if (!isset($form->name)) { $form->name = ""; } if (!isset($form->intro)) { $form->intro = ""; } if (!isset($form->timeopen)) { $form->timeopen = ""; } if (!isset($form->timeclose)) { $form->timeclose = ""; } if (!isset($form->attempts)) { $form->attempts = $CFG->quiz_attempts; } if (!isset($form->attemptonlast)) { $form->attemptonlast = $CFG->quiz_attemptonlast; } if (!isset($form->grademethod)) { $form->grademethod = $CFG->quiz_grademethod; } if (!isset($form->decimalpoints)) { $form->decimalpoints = $CFG->quiz_decimalpoints; } if (!isset($form->feedback)) { $form->feedback = $CFG->quiz_showfeedback; } if (!isset($form->correctanswers)) { $form->correctanswers = $CFG->quiz_showanswer; } if (!isset($form->review)) { $form->review = $CFG->quiz_allowreview; } if (!isset($form->questionsperpage)) { $form->questionsperpage = 0; } if (!isset($form->shufflequestions)) { $form->shufflequestions = $CFG->quiz_shufflequestions; } if (!isset($form->shuffleanswers)) { $form->shuffleanswers = $CFG->quiz_shuffleanswers; } if (!isset($form->grade)) { $form->grade = $CFG->quiz_maximumgrade; } if (!isset($form->questions)) { $form->questions = ""; } if (!isset($form->password)) { $form->password = $CFG->quiz_password; } if (!isset($form->subnet)) { $form->subnet = $CFG->quiz_subnet; } if (!isset($form->timelimit)) { $form->timelimit = $CFG->quiz_timelimit; } if (!isset($form->popup)) { $form->popup = $CFG->quiz_popup; } $fix = 0; // This will later be set to 1 if some of the variables have been fixed by the admin. // the following are used for drop-down menus $reviewoptions = array(); $reviewoptions[0] = get_string('reviewnever', 'quiz'); $reviewoptions[1] = get_string('reviewafter', 'quiz'); $reviewoptions[2] = get_string('reviewbefore', 'quiz'); $reviewoptions[3] = get_string('reviewalways', 'quiz'); $yesnooptions = array(); $yesnooptions[0] = get_string("no"); $yesnooptions[1] = get_string("yes"); $attemptoptions = array(); $attemptoptions[0] = get_string("attemptsunlimited", "quiz"); $attemptoptions[1] = "1 ".strtolower(get_string("attempt", "quiz")); for ($i=2;$i<=6;$i++) { $attemptoptions[$i] = "$i ".strtolower(get_string("attempts", "quiz")); } $grades = array(); for ($i=100; $i>=1; $i--) { $grades[$i] = $i; } $grades[0] = get_string("nograde"); ?>
quiz_fix_timelimit) { ?> quiz_fix_questionsperpage) { ?> quiz_fix_shufflequestions) { ?> quiz_fix_shuffleanswers) { ?> quiz_fix_attempts) { ?> quiz_fix_attemptonlast) { ?> quiz_fix_grademethod) { ?> quiz_fix_decimalpoints) { ?> quiz_fix_showfeedback) { ?> quiz_fix_showanswer) { ?> quiz_fix_allowreview) { ?> quiz_fix_maximumgrade) { ?> quiz_fix_popup) { ?> quiz_fix_password) { ?> quiz_fix_subnet) { ?>
:
:

'; emoticonhelpbutton("form", "description"); echo '
'; } ?>
intro); ?>
: timeopen and $course->format == "weeks") { $form->timeopen = $course->startdate + (($form->section - 1) * 608400); } print_date_selector("openday", "openmonth", "openyear", $form->timeopen); print_time_selector("openhour", "openminute", $form->timeopen); helpbutton("timeopen", get_string("quizopen","quiz"), "quiz"); ?>
: timeclose and $course->format == "weeks") { $form->timeclose = $course->startdate + (($form->section) * 608400); } print_date_selector("closeday", "closemonth", "closeyear", $form->timeclose); print_time_selector("closehour", "closeminute", $form->timeclose); helpbutton("timeopen", get_string("quizclose","quiz"), "quiz"); ?>
: timelimit, get_string("minutes","quiz")); helpbutton("timelimit", get_string("quiztimer","quiz"), "quiz"); ?>
: questionsperpage, ''); helpbutton('questionsperpage', get_string('questionsperpage'), 'quiz'); ?>
: shufflequestions", ""); helpbutton("shufflequestions", get_string("shufflequestions","quiz"), "quiz"); ?>
: shuffleanswers", ""); helpbutton("shuffleanswers", get_string("shuffleanswers","quiz"), "quiz"); ?>
: attempts", ""); helpbutton("attempts", get_string("attemptsallowed","quiz"), "quiz"); ?>
: attemptonlast", ""); helpbutton("repeatattempts", get_string("eachattemptbuildsonthelast", "quiz"), "quiz"); ?>
: grademethod", ""); helpbutton("grademethod", get_string("grademethod","quiz"), "quiz"); ?>
: decimalpoints", ""); helpbutton("decimalpoints", get_string("decimalpoints","quiz"), "quiz"); ?>
: feedback", ""); helpbutton("feedback", get_string("showfeedback","quiz"), "quiz"); ?>
: correctanswers", ""); helpbutton("correctanswers", get_string("showcorrectanswer","quiz"), "quiz"); ?>
: review", ""); helpbutton("review2", get_string("allowreview","quiz"), "quiz"); ?>
: grade", ""); helpbutton("maxgrade", get_string("maximumgrade"), "quiz"); ?>
: popup", ""); helpbutton("popup", get_string("popup","quiz"), "quiz"); ?>
:
:

:
quiz_fix_timelimit) { ?> quiz_fix_questionsperpage) { ?> quiz_fix_shufflequestions) { ?> quiz_fix_shuffleanswers) { ?> quiz_fix_attempts) { ?> quiz_fix_attemptonlast) { ?> quiz_fix_grademethod) { ?> quiz_fix_showfeedback) { ?> quiz_fix_showanswer) { ?> quiz_fix_allowreview) { ?> quiz_fix_maximumgrade) { ?> quiz_fix_popup) { ?> quiz_fix_password) { ?> quiz_fix_subnet) { ?>
: timelimit, get_string("minutes","quiz")); helpbutton("timelimit", get_string("quiztimer","quiz"), "quiz"); ?>
: questionsperpage, ''); helpbutton('questionsperpage', get_string('questionsperpage'), 'quiz'); ?>
: shufflequestions", ""); helpbutton("shufflequestions", get_string("shufflequestions","quiz"), "quiz"); ?>
: shuffleanswers", ""); helpbutton("shuffleanswers", get_string("shuffleanswers","quiz"), "quiz"); ?>
: attempts", ""); helpbutton("attempts", get_string("attemptsallowed","quiz"), "quiz"); ?>
: attemptonlast", ""); helpbutton("repeatattempts", get_string("eachattemptbuildsonthelast", "quiz"), "quiz"); ?>
: grademethod", ""); helpbutton("grademethod", get_string("grademethod","quiz"), "quiz"); ?>
: feedback", ""); helpbutton("feedback", get_string("showfeedback","quiz"), "quiz"); ?>
: correctanswers", ""); helpbutton("correctanswers", get_string("showcorrectanswer","quiz"), "quiz"); ?>
: review", ""); helpbutton("review", get_string("allowreview","quiz"), "quiz"); ?>
: grade", ""); helpbutton("maxgrade", get_string("maximumgrade"), "quiz"); ?>
: popup", ""); helpbutton("popup", get_string("popup","quiz"), "quiz"); ?>
:
:

" /> instance) { ?> wwwroot/mod/quiz/edit.php?quizid=$form->instance") ?>" /> " />