Skip to content
Browse files

Merge branch 'MDL-26937' of git://github.com/timhunt/moodle into MOOD…

…LE_19_STABLE
  • Loading branch information...
2 parents 551a610 + 71ec5d1 commit 9330414966265d477e6f1588e15d157091626465 @stronk7 stronk7 committed May 2, 2011
Showing with 16 additions and 3 deletions.
  1. +16 −3 mod/quiz/report/overview/report.php
View
19 mod/quiz/report/overview/report.php
@@ -348,9 +348,22 @@ function display($quiz, $cm, $course) {
"END) AS gradedattempt, ";
}
- $select .= 'qa.uniqueid AS attemptuniqueid, qa.id AS attempt, ' .
- 'u.id AS userid, u.idnumber, u.firstname, u.lastname, u.picture, u.imagealt, ' .
- 'qa.sumgrades, qa.timefinish, qa.timestart, qa.timefinish - qa.timestart AS duration ';
+ $select .= '
+ qa.uniqueid AS attemptuniqueid,
+ qa.id AS attempt,
+ u.id AS userid,
+ u.idnumber,
+ u.firstname,
+ u.lastname,
+ u.picture,
+ u.imagealt,
+ u.email,
+ qa.sumgrades,
+ qa.timefinish,
+ qa.timestart,
+ CASE WHEN qa.timefinish = 0 THEN null
+ WHEN qa.timefinish > qa.timestart THEN qa.timefinish - qa.timestart
+ ELSE 0 END AS duration ';
// This part is the same for all cases - join users and quiz_attempts tables
$from = 'FROM '.$CFG->prefix.'user u ';

0 comments on commit 9330414

Please sign in to comment.
Something went wrong with that request. Please try again.