mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 17:02:03 +02:00
Merge branch 'MDL-45452-course_completion_excel_dates' of https://github.com/leonstr/moodle
This commit is contained in:
commit
d7dfae00a2
@ -56,6 +56,11 @@ $PAGE->set_pagelayout('report');
|
||||
$firstnamesort = ($sort == 'firstname');
|
||||
$excel = ($format == 'excelcsv');
|
||||
$csv = ($format == 'csv' || $excel);
|
||||
if ($csv) {
|
||||
$dateformat = "%F %T";
|
||||
} else {
|
||||
$dateformat = get_string('strftimedatetimeshort', 'langconfig');
|
||||
}
|
||||
|
||||
// Load CSV library
|
||||
if ($csv) {
|
||||
@ -592,7 +597,7 @@ foreach ($progress as $user) {
|
||||
$state = COMPLETION_INCOMPLETE;
|
||||
}
|
||||
if ($is_complete) {
|
||||
$date = userdate($criteria_completion->timecompleted, get_string('strftimedatetimeshort', 'langconfig'));
|
||||
$date = userdate($criteria_completion->timecompleted, $dateformat);
|
||||
} else {
|
||||
$date = '';
|
||||
}
|
||||
@ -640,7 +645,7 @@ foreach ($progress as $user) {
|
||||
$a->state = $describe;
|
||||
|
||||
if ($is_complete) {
|
||||
$a->date = userdate($criteria_completion->timecompleted, get_string('strftimedatetimeshort', 'langconfig'));
|
||||
$a->date = userdate($criteria_completion->timecompleted, $dateformat);
|
||||
} else {
|
||||
$a->date = '';
|
||||
}
|
||||
@ -694,7 +699,7 @@ foreach ($progress as $user) {
|
||||
$a = new StdClass;
|
||||
|
||||
if ($ccompletion->is_complete()) {
|
||||
$a->date = userdate($ccompletion->timecompleted, get_string('strftimedatetimeshort', 'langconfig'));
|
||||
$a->date = userdate($ccompletion->timecompleted, $dateformat);
|
||||
} else {
|
||||
$a->date = '';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user