]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-7308 - Oops, another place where we need to change formatting as a result of...
authortjhunt <tjhunt>
Fri, 15 Aug 2008 11:23:28 +0000 (11:23 +0000)
committertjhunt <tjhunt>
Fri, 15 Aug 2008 11:23:28 +0000 (11:23 +0000)
mod/quiz/editlib.php

index 52ecb64a8ae558b726a84750f1feb8f3c694b312..1b83bc765cb20b0fa7a662a4a0151bbb435f35b4 100644 (file)
@@ -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";