From: tjhunt Date: Mon, 17 Jul 2006 16:35:34 +0000 (+0000) Subject: Bug 6092 - Give quiz finish time as well as start time in the quiz overview report. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=a92a796a6a2275183b80a8fb4cdb9a4c13fb72a3;p=moodle.git Bug 6092 - Give quiz finish time as well as start time in the quiz overview report. --- diff --git a/mod/quiz/report/overview/report.php b/mod/quiz/report/overview/report.php index 0f2470f84b..4f92152475 100644 --- a/mod/quiz/report/overview/report.php +++ b/mod/quiz/report/overview/report.php @@ -107,8 +107,8 @@ class quiz_report extends quiz_default_report { } /// Define table columns - $tablecolumns = array('checkbox', 'picture', 'fullname', 'timestart', 'duration'); - $tableheaders = array(NULL, '', get_string('fullname'), get_string('startedon', 'quiz'), get_string('attemptduration', 'quiz')); + $tablecolumns = array('checkbox', 'picture', 'fullname', 'timestart', 'timefinish', 'duration'); + $tableheaders = array(NULL, '', get_string('fullname'), get_string('startedon', 'quiz'), get_string('timecompleted','quiz'), get_string('attemptduration', 'quiz')); if ($quiz->grade and $quiz->sumgrades) { $tablecolumns[] = 'sumgrades'; @@ -200,7 +200,7 @@ class quiz_report extends quiz_default_report { $formatg->set_align('center'); // Here starts workshhet headers - $headers = array(get_string('fullname'), get_string('startedon', 'quiz'), get_string('attemptduration', 'quiz')); + $headers = array(get_string('fullname'), get_string('startedon', 'quiz'), get_string('timecompleted', 'quiz'), get_string('attemptduration', 'quiz')); if ($quiz->grade and $quiz->sumgrades) { $headers[] = get_string('grade', 'quiz').'/'.$quiz->grade; @@ -225,7 +225,7 @@ class quiz_report extends quiz_default_report { header("Cache-Control: must-revalidate,post-check=0,pre-check=0"); header("Pragma: public"); - $headers = get_string('fullname')."\t".get_string('startedon', 'quiz')."\t".get_string('attemptduration', 'quiz'); + $headers = get_string('fullname')."\t".get_string('startedon', 'quiz')."\t".get_string('timecompleted', 'quiz')."\t".get_string('attemptduration', 'quiz'); if ($quiz->grade and $quiz->sumgrades) { $headers .= "\t".get_string('grade', 'quiz')."/".$quiz->grade; @@ -377,6 +377,7 @@ class quiz_report extends quiz_default_report { $picture, $userlink, empty($attempt->attempt) ? '-' : ''.userdate($attempt->timestart, $strtimeformat).'', + empty($attempt->timefinish) ? '-' : ''.userdate($attempt->timefinish, $strtimeformat).'', empty($attempt->attempt) ? '-' : (empty($attempt->timefinish) ? get_string('unfinished', 'quiz') : format_time($attempt->duration)) @@ -385,6 +386,7 @@ class quiz_report extends quiz_default_report { else { $row = array(fullname($attempt), empty($attempt->attempt) ? '-' : userdate($attempt->timestart, $strtimeformat), + empty($attempt->timefinish) ? '-' : userdate($attempt->timefinish, $strtimeformat), empty($attempt->attempt) ? '-' : (empty($attempt->timefinish) ? get_string('unfinished', 'quiz') : format_time($attempt->duration)) @@ -541,4 +543,4 @@ class quiz_report extends quiz_default_report { } } -?> +?> \ No newline at end of file