Added configuration support for decimalpoints

This commit is contained in:
stronk7
2005-02-14 18:56:53 +00:00
parent 72036f9305
commit ee40f7a720
3 changed files with 41 additions and 0 deletions
+19
View File
@@ -186,6 +186,25 @@
</td>
</tr>
<tr valign="top">
<td align="right"><b><?php print_string("decimalpoints", "quiz") ?>:</b></td>
<td>
<?php
unset($options);
$options[0] = '0';
$options[1] = '1';
$options[2] = '2';
$options[3] = '3';
choose_from_menu ($options, "quiz_decimalpoints", $CFG->quiz_decimalpoints, "", "", "");
helpbutton("decimalpoints", get_string("decimalpoints","quiz"), "quiz");
?>
</td>
<td align="center">
<input type="hidden" name="quiz_fix_decimalpoints" value="0">
<input type="checkbox" name="quiz_fix_decimalpoints" value="1" <?php p($CFG->quiz_fix_decimalpoints ? "checked" : "") ?> />
</td>
</tr>
<tr valign="top">
<td align="right"><b><?php print_string("showfeedback", "quiz") ?>:</b></td>
<td>
+2
View File
@@ -8,6 +8,7 @@
'quiz_attemptonlast' => 0,
'quiz_attempts' => 0,
'quiz_grademethod' => '',
'quiz_decimalpoints' => 2,
'quiz_maximumgrade' => 0,
'quiz_password' => '',
'quiz_popup' => 0,
@@ -22,6 +23,7 @@
'quiz_fix_attemptonlast' => 0,
'quiz_fix_attempts' => 0,
'quiz_fix_grademethod' => 0,
'quiz_fix_decimalpoints' => 0,
'quiz_fix_maximumgrade' => 0,
'quiz_fix_password' => 0,
'quiz_fix_popup' => 0,
+20
View File
@@ -54,6 +54,9 @@
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;
}
@@ -272,6 +275,23 @@
</tr>
<?php } ?>
<?php if (!$CFG->quiz_fix_decimalpoints) { ?>
<tr valign="top">
<td align="right"><b><?php print_string("decimalpoints", "quiz") ?>:</b></td>
<td>
<?php
unset($options);
$options[0] = '0';
$options[1] = '1';
$options[2] = '2';
$options[3] = '3';
choose_from_menu($options, "decimalpoints", "$form->decimalpoints", "");
helpbutton("decimalpoints", get_string("decimalpoints","quiz"), "quiz");
?>
</td>
</tr>
<?php } ?>
<?php if (!$CFG->quiz_fix_showfeedback) { ?>
<tr valign="top">
<td align="right"><b><?php print_string("showfeedback", "quiz") ?>:</b></td>