Browse Source

Tidy up messages when a group associated with a group session has been deleted.

MOODLE_29_STABLE
Dan Marsden 9 years ago
parent
commit
b4da346b25
  1. 1
      lang/en/attendance.php
  2. 10
      renderer.php

1
lang/en/attendance.php

@ -319,3 +319,4 @@ $string['repeatevery'] = 'Repeat every';
$string['repeatuntil'] = 'Repeat until';
$string['repeaton'] = 'Repeat on';
$string['invalidsessionendtime'] = 'The end time must be greater than start time';
$string['deletedgroup'] = 'The group associated with this session has been deleted';

10
renderer.php

@ -235,7 +235,15 @@ class mod_attendance_renderer extends plugin_renderer_base {
$table->data[$sess->id][] = $i;
if ($sess->groupid) {
$table->data[$sess->id][] = get_string('group') . ': ' . $sessdata->groups[$sess->groupid]->name;
if (empty($sessdata->groups[$sess->groupid])) {
$table->data[$sess->id][] = get_string('deletedgroup', 'attendance');
// Remove actions and links on date/time.
$dta['actions'] = '';
$dta['date'] = userdate($sess->sessdate, get_string('strftimedmyw', 'attendance'));
$dta['time'] = $this->construct_time($sess->sessdate, $sess->duration);
} else {
$table->data[$sess->id][] = get_string('group') . ': ' . $sessdata->groups[$sess->groupid]->name;
}
} else {
$table->data[$sess->id][] = get_string('commonsession', 'attendance');
}

Loading…
Cancel
Save