diff --git a/renderer.php b/renderer.php index 2631141..2db21b4 100644 --- a/renderer.php +++ b/renderer.php @@ -1074,7 +1074,7 @@ class mod_attendance_renderer extends plugin_renderer_base { $row->cells[] = format_float($status->grade, 1, true, true) . ' / ' . format_float($statussetmaxpoints[$status->setnumber], 1, true, true); $row->cells[] = $sess->remarks; - } else if ($sess->sessdate < $userdata->user->enrolmentstart) { + } else if (($sess->sessdate + $sess->duration) < $userdata->user->enrolmentstart) { $cell = new html_table_cell(get_string('enrolmentstart', 'attendance', userdate($userdata->user->enrolmentstart, '%d.%m.%Y'))); $cell->colspan = 3; diff --git a/renderhelpers.php b/renderhelpers.php index 8483963..8358383 100644 --- a/renderhelpers.php +++ b/renderhelpers.php @@ -74,7 +74,7 @@ class user_sessions_cells_generator { $this->construct_remarks_cell($this->reportdata->sessionslog[$this->user->id][$sess->id]->remarks); } } else { - if ($this->user->enrolmentstart > $sess->sessdate) { + if ($this->user->enrolmentstart > ($sess->sessdate + $sess->duration)) { $starttext = get_string('enrolmentstart', 'attendance', userdate($this->user->enrolmentstart, '%d.%m.%Y')); $this->construct_enrolments_info_cell($starttext); } else if ($this->user->enrolmentend and $this->user->enrolmentend < $sess->sessdate) {