MDL-83850 report_progress: Add 'Completed' heading in the csv

This commit is contained in:
danghieu1407
2025-01-20 18:51:31 +07:00
parent f4f166695c
commit 4d3c8595cf
+3 -7
View File
@@ -314,14 +314,10 @@ foreach($activities as $activity) {
$datepassed = $activity->completionexpected && $activity->completionexpected <= time();
$datepassedclass = $datepassed ? 'completion-expired' : '';
if ($activity->completionexpected) {
if ($csv) {
$datetext = userdate($activity->completionexpected, "%F %T");
} else {
$datetext = userdate($activity->completionexpected, get_string('strftimedate', 'langconfig'));
}
if ($activity->completionexpected && !$csv) {
$datetext = userdate($activity->completionexpected, get_string('strftimedate', 'langconfig'));
} else {
$datetext='';
$datetext = get_string('completed');
}
// Some names (labels) come URL-encoded and can be very long, so shorten them