From 4d3c8595cfa655116e4d376a8f0cdc4754eaa388 Mon Sep 17 00:00:00 2001 From: danghieu1407 Date: Mon, 20 Jan 2025 18:51:31 +0700 Subject: [PATCH] MDL-83850 report_progress: Add 'Completed' heading in the csv --- report/progress/index.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/report/progress/index.php b/report/progress/index.php index 197de9b68b2..5f0437a15cb 100644 --- a/report/progress/index.php +++ b/report/progress/index.php @@ -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