We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f01dda5 + c8aa068 commit 33d9a8aCopy full SHA for 33d9a8a
stash.php
@@ -95,8 +95,17 @@
95
if (!$confirm) {
96
$output = $PAGE->get_renderer('local_amos');
97
echo $output->header();
98
+ $name = trim($stash->name);
99
+ if (empty($name)) {
100
+ // If name is empty, use the time of creation or modification.
101
+ $time = $stash->timemodified;
102
+ if (!$time) {
103
+ $time = $stash->timecreated;
104
+ }
105
+ $name = userdate($time, get_string('strftimedaydatetime', 'langconfig'));
106
107
echo $output->confirm(
- get_string('stashdropconfirm', 'local_amos', s($stash->name)),
108
+ get_string('stashdropconfirm', 'local_amos', s($name)),
109
new moodle_url($PAGE->url, [
110
'confirm' => true,
111
'drop' => $drop,
0 commit comments