Skip to content

Commit

Permalink
MDL-12362 - Don't show scores for incomplete attempts on the quiz vie…
Browse files Browse the repository at this point in the history
…w page. Merged from MOODLE_19_STABLE.
  • Loading branch information
tjhunt committed Nov 27, 2007
1 parent d3e0806 commit 9973187
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mod/quiz/view.php
Expand Up @@ -257,13 +257,13 @@
$timetaken = format_time($quiz->timeclose - $attempt->timestart);
$datecompleted = userdate($quiz->timeclose);
} else {
// Something wheird happened.
// Something weird happened.
$timetaken = '';
$datecompleted = '';
}
$row[] = $datecompleted;

if ($markcolumn) {
if ($markcolumn && $attempt->timefinish > 0) {
if ($attemptoptions->scores) {
$row[] = make_review_link(round($attempt->sumgrades, $quiz->decimalpoints), $quiz, $attempt);
} else {
Expand All @@ -275,7 +275,7 @@
$attemptgrade = quiz_rescale_grade($attempt->sumgrades, $quiz);

if ($gradecolumn) {
if ($attemptoptions->scores) {
if ($attemptoptions->scores && $attempt->timefinish > 0) {
$formattedgrade = $attemptgrade;
// highlight the highest grade if appropriate
if ($overallstats && $numattempts > 1 && !is_null($mygrade) && $attemptgrade == $mygrade && $quiz->grademethod == QUIZ_GRADEHIGHEST) {
Expand All @@ -288,7 +288,7 @@
}
}

if ($feedbackcolumn) {
if ($feedbackcolumn && $attempt->timefinish > 0) {
if ($attemptoptions->overallfeedback) {
$row[] = quiz_feedback_for_grade($attemptgrade, $quiz->id);
} else {
Expand Down

0 comments on commit 9973187

Please sign in to comment.