diff --git a/classes/structure.php b/classes/structure.php index 6a16719..44c3302 100644 --- a/classes/structure.php +++ b/classes/structure.php @@ -440,8 +440,15 @@ class mod_attendance_structure { $sess->description = $description; $sess->lasttaken = 0; $sess->lasttakenby = 0; - $sess->studentscanmark = 0; - $sess->studentpassword = ''; + if (!isset($sess->studentscanmark)) { + $sess->studentscanmark = 0; + } + if (!isset($sess->studentpassword)) { + $sess->studentpassword = ''; + } + if (!isset($sess->subnet)) { + $sess->subnet = ''; + } $event->add_record_snapshot('attendance_sessions', $sess); $event->trigger(); diff --git a/tests/behat/report.feature b/tests/behat/report.feature index a1c0866..6a8e220 100644 --- a/tests/behat/report.feature +++ b/tests/behat/report.feature @@ -239,4 +239,4 @@ Feature: Visiting reports And "5 / 6" "text" should exist in the "Maximum possible points:" "table_row" And "83.3%" "text" should exist in the "Maximum possible percentage:" "table_row" - And I log out + And I log out \ No newline at end of file