From: tjhunt <tjhunt> Date: Fri, 15 Aug 2008 11:23:28 +0000 (+0000) Subject: MDL-7308 - Oops, another place where we need to change formatting as a result of... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=c401e63272dad943985dab48b26723b23c99017e;p=moodle.git MDL-7308 - Oops, another place where we need to change formatting as a result of this DB change. --- diff --git a/mod/quiz/editlib.php b/mod/quiz/editlib.php index 52ecb64a8a..1b83bc765c 100644 --- a/mod/quiz/editlib.php +++ b/mod/quiz/editlib.php @@ -280,7 +280,7 @@ function quiz_print_question_list($quiz, $pageurl, $allowdelete=true, $showbreak if ($question->qtype == 'description') { echo "<input type=\"hidden\" name=\"q$qnum\" value=\"0\" /> \n"; } else { - echo '<input type="text" name="q'.$qnum.'" size="2" value="'.$quiz->grades[$qnum]. + echo '<input type="text" name="q'.$qnum.'" size="' . ($quiz->decimalpoints + 2) . '" value="'.(0 + $quiz->grades[$qnum]). '" tabindex="'.($lastindex+$qno).'" />'; } echo '</td><td align="center">'; @@ -306,8 +306,8 @@ function quiz_print_question_list($quiz, $pageurl, $allowdelete=true, $showbreak print_string('maximumgrade'); echo ": </td>"; echo "<td align=\"left\">\n"; - echo '<input type="text" name="maxgrade" size="2" tabindex="'.($qno+1) - .'" value="'.$quiz->grade.'" />'; + echo '<input type="text" name="maxgrade" size="' . ($quiz->decimalpoints + 2) . '" tabindex="'.($qno+1) + .'" value="'.quiz_format_grade($quiz, $quiz->grade).'" />'; echo '</td><td align="left">'; helpbutton("maxgrade", get_string("maximumgrade"), "quiz"); echo "</td></tr></table>\n";