Display tweaks

This commit is contained in:
moodler 2002-10-21 13:13:33 +00:00
parent 38f03e5a5c
commit 2383cadbab
2 changed files with 9 additions and 8 deletions

View File

@ -736,7 +736,7 @@ function quiz_get_best_grade($quizid, $userid) {
return 0;
}
return $grade->grade;
return (round($grade->grade,0));
}
function quiz_get_grade_records($quiz) {

View File

@ -70,13 +70,6 @@
print_simple_box(text_to_html($quiz->intro), "CENTER");
if ($available) {
echo "<P ALIGN=CENTER>".get_string("quizavailable", "quiz", userdate($quiz->timeclose));
} else if ($timenow < $quiz->timeopen) {
echo "<P ALIGN=CENTER>".get_string("quiznotavailable", "quiz", userdate($quiz->timeopen));
} else {
echo "<P ALIGN=CENTER>".get_string("quizclosed", "quiz", userdate($quiz->timeclose));
}
if (isguest()) {
print_heading(get_string("guestsno", "quiz"));
@ -116,6 +109,14 @@
print_table($table);
}
if ($available) {
echo "<P ALIGN=CENTER>".get_string("quizavailable", "quiz", userdate($quiz->timeclose));
} else if ($timenow < $quiz->timeopen) {
echo "<P ALIGN=CENTER>".get_string("quiznotavailable", "quiz", userdate($quiz->timeopen));
} else {
echo "<P ALIGN=CENTER>".get_string("quizclosed", "quiz", userdate($quiz->timeclose));
}
$mygrade = quiz_get_best_grade($quiz->id, $USER->id);
if (!$quiz->questions) {