Added configuration support for decimalpoints
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user