$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';
$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');
}