diff --git a/renderer.php b/renderer.php index 581f83c..c5f63f3 100644 --- a/renderer.php +++ b/renderer.php @@ -819,7 +819,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 = 2; diff --git a/renderhelpers.php b/renderhelpers.php index bf07176..04490c7 100644 --- a/renderhelpers.php +++ b/renderhelpers.php @@ -60,7 +60,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) {