--- /dev/null
+<form method="post" action="module.php" name="form">
+<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>">
+
+<table cellpadding="9" cellspacing="0" >
+
+<tr valign="top">
+ <th align="right"> </th>
+ <th align="left">
+ <?php print_string('sitedefault'); ?>
+ </th>
+ <th align="center">
+ <?php print_string('fix'); helpbutton("fixdefaults"); ?>
+ </th>
+</tr>
+
+<tr valign="top">
+ <td align="right"><b><?php print_string("timelimit", "quiz") ?>:</b></td>
+ <td>
+ <?php
+ print_timer_selector($CFG->quiz_timelimit, get_string("minutes","quiz"), 'quiz_timelimit');
+ helpbutton("timelimit", get_string("quiztimer","quiz"), "quiz");
+ ?>
+ </td>
+ <td align="center">
+ <input type="hidden" name="quiz_fix_timelimit" value="0">
+ <input type="checkbox" name="quiz_fix_timelimit" value="1" <?php p($CFG->quiz_fix_timelimit ? "checked" : "") ?> />
+ </td>
+</tr>
+
+<tr valign="top">
+ <td align="right"><b><?php print_string("shufflequestions", "quiz") ?>:</b></td>
+ <td>
+ <?php
+ unset($options);
+ $options[0] = get_string("no");
+ $options[1] = get_string("yes");
+ choose_from_menu ($options, "quiz_shufflequestions", $CFG->quiz_shufflequestions, "", "", "");
+ helpbutton("shufflequestions", get_string("shufflequestions","quiz"), "quiz");
+ ?>
+ </td>
+ <td align="center">
+ <input type="hidden" name="quiz_fix_shufflequestions" value="0">
+ <input type="checkbox" name="quiz_fix_shufflequestions" value="1" <?php p($CFG->quiz_fix_shufflequestions ? "checked" : "") ?> />
+ </td>
+</tr>
+
+<tr valign="top">
+ <td align="right"><b><?php print_string("shuffleanswers", "quiz") ?>:</b></td>
+ <td>
+ <?php
+ unset($options);
+ $options[0] = get_string("no");
+ $options[1] = get_string("yes");
+ choose_from_menu ($options, "quiz_shuffleanswers", $CFG->quiz_shuffleanswers, "", "", "");
+ helpbutton("attempts", get_string("attemptsallowed","quiz"), "quiz");
+ ?>
+ </td>
+ <td align="center">
+ <input type="hidden" name="quiz_fix_shuffleanswers" value="0">
+ <input type="checkbox" name="quiz_fix_shuffleanswers" value="1" <?php p($CFG->quiz_fix_shuffleanswers ? "checked" : "") ?> />
+ </td>
+</tr>
+
+<tr valign="top">
+ <td align="right"><b><?php print_string("attemptsallowed", "quiz") ?>:</b></td>
+ <td>
+ <?php
+ unset($options);
+ $options[0] = get_string("attemptsunlimited", "quiz");
+ $options[1] = "1 ".strtolower(get_string("attempt", "quiz"));
+ for ($i=2;$i<=6;$i++) {
+ $options[$i] = "$i ".strtolower(get_string("attempts", "quiz"));
+ }
+ choose_from_menu ($options, "quiz_attempts", $CFG->quiz_attempts, "", "", "");
+ helpbutton("attempts", get_string("attemptsallowed","quiz"), "quiz");
+ ?>
+ </td>
+ <td align="center">
+ <input type="hidden" name="quiz_fix_attempts" value="0">
+ <input type="checkbox" name="quiz_fix_attempts" value="1" <?php p($CFG->quiz_fix_attempts ? "checked" : "") ?> />
+ </td>
+</tr>
+
+<tr valign="top">
+ <td align="right"><b><?php print_string("eachattemptbuildsonthelast", "quiz") ?>:</b></td>
+ <td>
+ <?php
+ unset($options);
+ $options[0] = get_string("no");
+ $options[1] = get_string("yes");
+ choose_from_menu ($options, "quiz_attemptonlast", $CFG->quiz_attemptonlast, "", "", "");
+ helpbutton("repeatattempts", get_string("eachattemptbuildsonthelast", "quiz"), "quiz");
+ ?>
+ </td>
+ <td align="center">
+ <input type="hidden" name="quiz_fix_attemptonlast" value="0">
+ <input type="checkbox" name="quiz_fix_attemptonlast" value="1" <?php p($CFG->quiz_fix_attemptonlast ? "checked" : "") ?> />
+ </td>
+</tr>
+
+<tr valign="top">
+ <td align="right"><b><?php print_string("grademethod", "quiz") ?>:</b></td>
+ <td>
+ <?php
+ choose_from_menu ($QUIZ_GRADE_METHOD, "quiz_grademethod", $CFG->quiz_grademethod, "", "", "");
+ helpbutton("grademethod", get_string("grademethod","quiz"), "quiz");
+ ?>
+ </td>
+ <td align="center">
+ <input type="hidden" name="quiz_fix_grademethod" value="0">
+ <input type="checkbox" name="quiz_fix_grademethod" value="1" <?php p($CFG->quiz_fix_grademethod ? "checked" : "") ?> />
+ </td>
+</tr>
+
+<tr valign="top">
+ <td align="right"><b><?php print_string("showfeedback", "quiz") ?>:</b></td>
+ <td>
+ <?php
+ unset($options);
+ $options[0] = get_string("no");
+ $options[1] = get_string("yes");
+ choose_from_menu ($options, "quiz_showfeedback", $CFG->quiz_showfeedback, "", "", "");
+ helpbutton("feedback", get_string("showfeedback","quiz"), "quiz");
+ ?>
+ </td>
+ <td align="center">
+ <input type="hidden" name="quiz_fix_showfeedback" value="0">
+ <input type="checkbox" name="quiz_fix_showfeedback" value="1" <?php p($CFG->quiz_fix_showfeedback ? "checked" : "") ?> />
+ </td>
+</tr>
+
+<tr valign="top">
+ <td align="right"><b><?php print_string("showcorrectanswer", "quiz") ?>:</b></td>
+ <td>
+ <?php
+ unset($options);
+ $options[0] = get_string("no");
+ $options[1] = get_string("yes");
+ choose_from_menu ($options, "quiz_showanswer", $CFG->quiz_showanswer, "", "", "");
+ helpbutton("correctanswers", get_string("showcorrectanswer","quiz"), "quiz");
+ ?>
+ </td>
+ <td align="center">
+ <input type="hidden" name="quiz_fix_showanswer" value="0">
+ <input type="checkbox" name="quiz_fix_showanswer" value="1" <?php p($CFG->quiz_fix_showanswer ? "checked" : "") ?> />
+ </td>
+</tr>
+
+<tr valign="top">
+ <td align="right"><b><?php print_string("allowreview", "quiz") ?>:</b></td>
+ <td>
+ <?php
+ unset($options);
+ $options[0] = get_string("no");
+ $options[1] = get_string("yes");
+ choose_from_menu ($options, "quiz_allowreview", $CFG->quiz_allowreview, "", "", "");
+ helpbutton("review", get_string("allowreview","quiz"), "quiz");
+ ?>
+ </td>
+ <td align="center">
+ <input type="hidden" name="quiz_fix_allowreview" value="0">
+ <input type="checkbox" name="quiz_fix_allowreview" value="1" <?php p($CFG->quiz_fix_allowreview ? "checked" : "") ?> />
+ </td>
+</tr>
+
+<tr valign="top">
+ <td align="right"><b><?php print_string("maximumgrade") ?>:</b></td>
+ <td>
+ <?php
+ unset($grades);
+ for ($i=100; $i>=1; $i--) {
+ $grades[$i] = $i;
+ }
+ $grades[0] = get_string("nograde");
+ choose_from_menu ($grades, "quiz_maximumgrade", $CFG->quiz_maximumgrade, "", "", "");
+ helpbutton("maxgrade", get_string("maximumgrade"), "quiz");
+ ?>
+ </td>
+ <td align="center">
+ <input type="hidden" name="quiz_fix_maximumgrade" value="0">
+ <input type="checkbox" name="quiz_fix_maximumgrade" value="1" <?php p($CFG->quiz_fix_maximumgrade ? "checked" : "") ?> />
+ </td>
+</tr>
+
+<tr valign="top">
+ <td align="right"><b><?php print_string("popup", "quiz") ?>:</b></td>
+ <td>
+ <?php
+ unset($options);
+ $options[0] = get_string("no");
+ $options[1] = get_string("yes");
+ choose_from_menu ($options, "quiz_popup", $CFG->quiz_popup, "", "", "");
+ helpbutton("popup", get_string("popup","quiz"), "quiz");
+ ?>
+ </td>
+ <td align="center">
+ <input type="hidden" name="quiz_fix_popup" value="0">
+ <input type="checkbox" name="quiz_fix_popup" value="1" <?php p($CFG->quiz_fix_popup ? "checked" : "") ?> />
+ </td>
+</tr>
+
+<tr valign="top">
+ <td align="right"><b><?php print_string("requirepassword", "quiz") ?>:</b></td>
+ <td>
+ <input type="text" name="quiz_password" size="20" value="<?php p($CFG->quiz_password) ?>" />
+ <?php helpbutton("requirepassword", get_string("requirepassword", "quiz"), "quiz"); ?>
+ </td>
+ <td align="center">
+ <input type="hidden" name="quiz_fix_password" value="0">
+ <input type="checkbox" name="quiz_fix_password" value="1" <?php p($CFG->quiz_fix_password ? "checked" : "") ?> />
+ </td>
+</tr>
+
+<tr valign="top">
+ <td align="right"><b><?php print_string("requiresubnet", "quiz") ?>:</b></td>
+ <td>
+ <input type="text" name="quiz_subnet" size="20" value="<?php p($CFG->quiz_subnet) ?>" />
+ <?php helpbutton("requiresubnet", get_string("requiresubnet", "quiz"), "quiz"); ?>
+ </td>
+ <td align="center">
+ <input type="hidden" name="quiz_fix_subnet" value="0">
+ <input type="checkbox" name="quiz_fix_subnet" value="1" <?php p($CFG->quiz_fix_subnet ? "checked" : "") ?> />
+ </td>
+</tr>
+
+<tr>
+ <td colspan="3" align="center">
+ <input type="submit" value="<?php print_string("savechanges") ?>" />
+ </td>
+</tr>
+</table>
+
+</form>
$form->timeclose = "";
}
if (!isset($form->attempts)) {
- $form->attempts = 0;
+ $form->attempts = $CFG->quiz_attempts;
}
if (!isset($form->attemptonlast)) {
- $form->attemptonlast = 0;
+ $form->attemptonlast = $CFG->quiz_attemptonlast;
}
if (!isset($form->grademethod)) {
- $form->grademethod = "";
+ $form->grademethod = $CFG->quiz_grademethod;
}
if (!isset($form->feedback)) {
- $form->feedback = "";
+ $form->feedback = $CFG->quiz_showfeedback;
}
if (!isset($form->correctanswers)) {
- $form->correctanswers = "";
+ $form->correctanswers = $CFG->quiz_showanswer;
}
if (!isset($form->review)) {
- $form->review = 0;
+ $form->review = $CFG->quiz_allowreview;
}
if (!isset($form->shufflequestions)) {
- $form->shufflequestions = 0;
+ $form->shufflequestions = $CFG->quiz_shufflequestions;
}
if (!isset($form->shuffleanswers)) {
- $form->shuffleanswers = 1;
+ $form->shuffleanswers = $CFG->quiz_shuffleanswers;
}
if (!isset($form->grade)) {
- $form->grade = 0;
+ $form->grade = $CFG->quiz_maximumgrade;
}
if (!isset($form->questions)) {
$form->questions = "";
}
if (!isset($form->password)) {
- $form->password = "";
+ $form->password = $CFG->quiz_password;
}
if (!isset($form->subnet)) {
- $form->subnet = "";
+ $form->subnet = $CFG->quiz_subnet;
}
if (!isset($form->timelimit)) {
- $form->timelimit = 0;
+ $form->timelimit = $CFG->quiz_timelimit;
}
if (!isset($form->popup)) {
- $form->popup = 0;
+ $form->popup = $CFG->quiz_popup;
}
?>
-
<form name="form" method="post" action="../mod/quiz/edit.php">
<center>
<table cellpadding="5">
+
<tr valign="top">
<td align="right"><b><?php print_string("name") ?>:</b></td>
<td>
<input type="text" name="name" size="40" value="<?php p($form->name) ?>" />
</td>
</tr>
+
<tr valign="top">
<td align="right"><b><?php print_string("introduction", "quiz") ?>:</b>
<br />
?>
</td>
</tr>
+
<tr valign="top">
<td align="right"><b><?php print_string("quizopen", "quiz") ?>:</b></td>
<td>
?>
</td>
</tr>
+
<tr valign="top">
<td align="right"><b><?php print_string("quizclose", "quiz") ?>:</b></td>
<td>
?>
</td>
</tr>
-<tr valign="top">
- <td align="right"><b><?php print_string("timelimit", "quiz") ?>:</b></td>
- <td>
- <?php
- print_timer_selector($form->timelimit, get_string("minutes","quiz"));
- helpbutton("timelimit", get_string("quiztimer","quiz"), "quiz");
- ?>
- </td>
-</tr>
-<tr valign="top">
- <td align="right"><b><?php print_string("shufflequestions", "quiz") ?>:</b></td>
- <td>
- <?php
- $options = array();
- $options[0] = get_string("no");
- $options[1] = get_string("yes");
- choose_from_menu($options, "shufflequestions", "$form->shufflequestions", "");
- helpbutton("shufflequestions", get_string("shufflequestions","quiz"), "quiz");
- ?>
- </td>
-</tr>
-<tr valign="top">
- <td align="right"><b><?php print_string("shuffleanswers", "quiz") ?>:</b></td>
- <td>
- <?php
- $options = array();
- $options[0] = get_string("no");
- $options[1] = get_string("yes");
- choose_from_menu($options, "shuffleanswers", "$form->shuffleanswers", "");
- helpbutton("shuffleanswers", get_string("shuffleanswers","quiz"), "quiz");
- ?>
- </td>
-</tr>
-<tr valign="top">
- <td align="right"><b><?php print_string("attemptsallowed", "quiz") ?>:</b></td>
- <td>
- <?php
- $options = array();
- $options[0] = get_string("attemptsunlimited", "quiz");
- $options[1] = "1 ".strtolower(get_string("attempt", "quiz"));
- for ($i=2;$i<=6;$i++) {
- $options[$i] = "$i ".strtolower(get_string("attempts", "quiz"));
- }
- choose_from_menu($options, "attempts", "$form->attempts", "");
- helpbutton("attempts", get_string("attemptsallowed","quiz"), "quiz");
- ?>
- </td>
-</tr>
-<tr valign="top">
- <td align="right"><b><?php print_string("eachattemptbuildsonthelast", "quiz") ?>:</b></td>
- <td>
- <?php
- $options = array();
- $options[0] = get_string("no");
- $options[1] = get_string("yes");
- choose_from_menu($options, "attemptonlast",
- "$form->attemptonlast", "");
- helpbutton("repeatattempts",
- get_string("eachattemptbuildsonthelast", "quiz"),
- "quiz");
- ?>
- </td>
-</tr>
-<tr valign="top">
- <td align="right"><b><?php print_string("grademethod", "quiz") ?>:</b></td>
- <td>
- <?php
- $options = array();
- $options[1] = get_string("gradehighest", "quiz");
- $options[2] = get_string("gradeaverage", "quiz");
- $options[3] = get_string("attemptfirst", "quiz");
- $options[4] = get_string("attemptlast", "quiz");
- choose_from_menu($QUIZ_GRADE_METHOD, "grademethod", "$form->grademethod", "");
- helpbutton("grademethod", get_string("grademethod","quiz"), "quiz");
- ?>
- </td>
-</tr>
-<tr valign="top">
- <td align="right"><b><?php print_string("showfeedback", "quiz") ?>:</b></td>
- <td>
- <?php
- $options = array();
- $options[0] = get_string("no");
- $options[1] = get_string("yes");
- choose_from_menu($options, "feedback", "$form->feedback", "");
- helpbutton("feedback", get_string("showfeedback","quiz"), "quiz");
- ?>
- </td>
-</tr>
-<tr valign="top">
- <td align="right"><b><?php print_string("showcorrectanswer", "quiz") ?>:</b></td>
- <td>
- <?php
- $options = array();
- $options[0] = get_string("no");
- $options[1] = get_string("yes");
- choose_from_menu($options, "correctanswers", "$form->correctanswers", "");
- helpbutton("correctanswers", get_string("showcorrectanswer","quiz"), "quiz");
- ?>
- </td>
-</tr>
-<tr valign="top">
- <td align="right"><b><?php print_string("allowreview", "quiz") ?>:</b></td>
- <td>
- <?php
- $options = array();
- $options[0] = get_string("no");
- $options[1] = get_string("yes");
- choose_from_menu($options, "review", "$form->review", "");
- helpbutton("review", get_string("allowreview","quiz"), "quiz");
- ?>
- </td>
-</tr>
-<tr valign="top">
- <td align="right"><b><?php print_string("maximumgrade") ?>:</b></td>
- <td>
- <?php
- for ($i=100; $i>=1; $i--) {
- $grades[$i] = $i;
- }
- $grades[0] = get_string("nograde");
- choose_from_menu($grades, "grade", "$form->grade", "");
- helpbutton("maxgrade", get_string("maximumgrade"), "quiz");
- ?>
- </td>
-</tr>
-<tr valign="top">
- <td align="right"><b><?php print_string("popup", "quiz") ?>:</b></td>
- <td>
- <?php
- $options = array();
- $options[0] = get_string("no");
- $options[1] = get_string("yes");
- choose_from_menu($options, "popup", "$form->popup", "");
- helpbutton("popup", get_string("popup","quiz"), "quiz");
- ?>
- </td>
-</tr>
-<tr valign="top">
- <td align="right"><b><?php print_string("requirepassword", "quiz") ?>:</b></td>
- <td>
- <input type="text" name="password" size="40" value="<?php p($form->password) ?>" />
- <?php helpbutton("requirepassword", get_string("requirepassword", "quiz"), "quiz"); ?>
- </td>
-</tr>
-<tr valign="top">
- <td align="right"><b><?php print_string("requiresubnet", "quiz") ?>:</b></td>
- <td>
- <input type="text" name="subnet" size="40" value="<?php p($form->subnet) ?>" />
- <?php helpbutton("requiresubnet", get_string("requiresubnet", "quiz"), "quiz"); ?>
- </td>
-</tr>
+<?php if ($CFG->quiz_fix_timelimit) { ?>
+ <input type="hidden" name="timelimit" value="<?php p($form->timelimit) ?>">
+<?php } else { ?>
+ <tr valign="top">
+ <td align="right"><b><?php print_string("timelimit", "quiz") ?>:</b></td>
+ <td>
+ <?php
+ print_timer_selector($form->timelimit, get_string("minutes","quiz"));
+ helpbutton("timelimit", get_string("quiztimer","quiz"), "quiz");
+ ?>
+ </td>
+ </tr>
+<?php } ?>
+
+<?php if ($CFG->quiz_fix_shufflequestions) { ?>
+ <input type="hidden" name="shufflequestions" value="<?php p($form->shufflequestions) ?>">
+<?php } else { ?>
+ <tr valign="top">
+ <td align="right"><b><?php print_string("shufflequestions", "quiz") ?>:</b></td>
+ <td>
+ <?php
+ $options = array();
+ $options[0] = get_string("no");
+ $options[1] = get_string("yes");
+ choose_from_menu($options, "shufflequestions", "$form->shufflequestions", "");
+ helpbutton("shufflequestions", get_string("shufflequestions","quiz"), "quiz");
+ ?>
+ </td>
+ </tr>
+<?php } ?>
+
+<?php if ($CFG->quiz_fix_shuffleanswers) { ?>
+ <input type="hidden" name="shuffleanswers" value="<?php p($form->shuffleanswers) ?>">
+<?php } else { ?>
+ <tr valign="top">
+ <td align="right"><b><?php print_string("shuffleanswers", "quiz") ?>:</b></td>
+ <td>
+ <?php
+ $options = array();
+ $options[0] = get_string("no");
+ $options[1] = get_string("yes");
+ choose_from_menu($options, "shuffleanswers", "$form->shuffleanswers", "");
+ helpbutton("shuffleanswers", get_string("shuffleanswers","quiz"), "quiz");
+ ?>
+ </td>
+ </tr>
+<?php } ?>
+
+<?php if ($CFG->quiz_fix_attempts) { ?>
+ <input type="hidden" name="attempts" value="<?php p($form->attempts) ?>">
+<?php } else { ?>
+ <tr valign="top">
+ <td align="right"><b><?php print_string("attemptsallowed", "quiz") ?>:</b></td>
+ <td>
+ <?php
+ $options = array();
+ $options[0] = get_string("attemptsunlimited", "quiz");
+ $options[1] = "1 ".strtolower(get_string("attempt", "quiz"));
+ for ($i=2;$i<=6;$i++) {
+ $options[$i] = "$i ".strtolower(get_string("attempts", "quiz"));
+ }
+ choose_from_menu($options, "attempts", "$form->attempts", "");
+ helpbutton("attempts", get_string("attemptsallowed","quiz"), "quiz");
+ ?>
+ </td>
+ </tr>
+<?php } ?>
+
+<?php if ($CFG->quiz_fix_attemptonlast) { ?>
+ <input type="hidden" name="attemptonlast" value="<?php p($form->attemptonlast) ?>">
+<?php } else { ?>
+ <tr valign="top">
+ <td align="right"><b><?php print_string("eachattemptbuildsonthelast", "quiz") ?>:</b></td>
+ <td>
+ <?php
+ $options = array();
+ $options[0] = get_string("no");
+ $options[1] = get_string("yes");
+ choose_from_menu($options, "attemptonlast",
+ "$form->attemptonlast", "");
+ helpbutton("repeatattempts",
+ get_string("eachattemptbuildsonthelast", "quiz"),
+ "quiz");
+ ?>
+ </td>
+ </tr>
+<?php } ?>
+
+<?php if ($CFG->quiz_fix_grademethod) { ?>
+ <input type="hidden" name="grademethod" value="<?php p($form->grademethod) ?>">
+<?php } else { ?>
+ <tr valign="top">
+ <td align="right"><b><?php print_string("grademethod", "quiz") ?>:</b></td>
+ <td>
+ <?php
+ $options = array();
+ $options[1] = get_string("gradehighest", "quiz");
+ $options[2] = get_string("gradeaverage", "quiz");
+ $options[3] = get_string("attemptfirst", "quiz");
+ $options[4] = get_string("attemptlast", "quiz");
+ choose_from_menu($QUIZ_GRADE_METHOD, "grademethod", "$form->grademethod", "");
+ helpbutton("grademethod", get_string("grademethod","quiz"), "quiz");
+ ?>
+ </td>
+ </tr>
+<?php } ?>
+
+<?php if ($CFG->quiz_fix_showfeedback) { ?>
+ <input type="hidden" name="feedback" value="<?php p($form->feedback) ?>">
+<?php } else { ?>
+ <tr valign="top">
+ <td align="right"><b><?php print_string("showfeedback", "quiz") ?>:</b></td>
+ <td>
+ <?php
+ $options = array();
+ $options[0] = get_string("no");
+ $options[1] = get_string("yes");
+ choose_from_menu($options, "feedback", "$form->feedback", "");
+ helpbutton("feedback", get_string("showfeedback","quiz"), "quiz");
+ ?>
+ </td>
+ </tr>
+<?php } ?>
+
+<?php if ($CFG->quiz_fix_showanswer) { ?>
+ <input type="hidden" name="correctanswers" value="<?php p($form->correctanswers) ?>">
+<?php } else { ?>
+ <tr valign="top">
+ <td align="right"><b><?php print_string("showcorrectanswer", "quiz") ?>:</b></td>
+ <td>
+ <?php
+ $options = array();
+ $options[0] = get_string("no");
+ $options[1] = get_string("yes");
+ choose_from_menu($options, "correctanswers", "$form->correctanswers", "");
+ helpbutton("correctanswers", get_string("showcorrectanswer","quiz"), "quiz");
+ ?>
+ </td>
+ </tr>
+<?php } ?>
+
+<?php if ($CFG->quiz_fix_allowreview) { ?>
+ <input type="hidden" name="review" value="<?php p($form->review) ?>">
+<?php } else { ?>
+ <tr valign="top">
+ <td align="right"><b><?php print_string("allowreview", "quiz") ?>:</b></td>
+ <td>
+ <?php
+ $options = array();
+ $options[0] = get_string("no");
+ $options[1] = get_string("yes");
+ choose_from_menu($options, "review", "$form->review", "");
+ helpbutton("review", get_string("allowreview","quiz"), "quiz");
+ ?>
+ </td>
+ </tr>
+<?php } ?>
+
+<?php if ($CFG->quiz_fix_maximumgrade) { ?>
+ <input type="hidden" name="grade" value="<?php p($form->grade) ?>">
+<?php } else { ?>
+ <tr valign="top">
+ <td align="right"><b><?php print_string("maximumgrade") ?>:</b></td>
+ <td>
+ <?php
+ for ($i=100; $i>=1; $i--) {
+ $grades[$i] = $i;
+ }
+ $grades[0] = get_string("nograde");
+
+ choose_from_menu($grades, "grade", "$form->grade", "");
+ helpbutton("maxgrade", get_string("maximumgrade"), "quiz");
+ ?>
+ </td>
+ </tr>
+<?php } ?>
+
+<?php if ($CFG->quiz_fix_popup) { ?>
+ <input type="hidden" name="popup" value="<?php p($form->popup) ?>">
+<?php } else { ?>
+ <tr valign="top">
+ <td align="right"><b><?php print_string("popup", "quiz") ?>:</b></td>
+ <td>
+ <?php
+ $options = array();
+ $options[0] = get_string("no");
+ $options[1] = get_string("yes");
+ choose_from_menu($options, "popup", "$form->popup", "");
+ helpbutton("popup", get_string("popup","quiz"), "quiz");
+ ?>
+ </td>
+ </tr>
+<?php } ?>
+
+<?php if ($CFG->quiz_fix_password) { ?>
+ <input type="hidden" name="password" value="<?php p($form->password) ?>">
+<?php } else { ?>
+ <tr valign="top">
+ <td align="right"><b><?php print_string("requirepassword", "quiz") ?>:</b></td>
+ <td>
+ <input type="text" name="password" size="40" value="<?php p($form->password) ?>" />
+ <?php helpbutton("requirepassword", get_string("requirepassword", "quiz"), "quiz"); ?>
+ </td>
+ </tr>
+<?php } ?>
+
+<?php if ($CFG->quiz_fix_subnet) { ?>
+ <input type="hidden" name="subnet" value="<?php p($form->subnet) ?>">
+<?php } else { ?>
+ <tr valign="top">
+ <td align="right"><b><?php print_string("requiresubnet", "quiz") ?>:</b></td>
+ <td>
+ <input type="text" name="subnet" size="40" value="<?php p($form->subnet) ?>" />
+ <?php helpbutton("requiresubnet", get_string("requiresubnet", "quiz"), "quiz"); ?>
+ </td>
+ </tr>
+<?php } ?>
</table>
<input type="hidden" name="questions" value="<?php p($form->questions) ?>" />