Browse Source

Fix some tests.

MOODLE_32_STABLE
Dan Marsden 8 years ago
parent
commit
9eaf63b746
  1. 11
      classes/structure.php
  2. 2
      tests/behat/report.feature

11
classes/structure.php

@ -440,8 +440,15 @@ class mod_attendance_structure {
$sess->description = $description; $sess->description = $description;
$sess->lasttaken = 0; $sess->lasttaken = 0;
$sess->lasttakenby = 0; $sess->lasttakenby = 0;
$sess->studentscanmark = 0; if (!isset($sess->studentscanmark)) {
$sess->studentpassword = ''; $sess->studentscanmark = 0;
}
if (!isset($sess->studentpassword)) {
$sess->studentpassword = '';
}
if (!isset($sess->subnet)) {
$sess->subnet = '';
}
$event->add_record_snapshot('attendance_sessions', $sess); $event->add_record_snapshot('attendance_sessions', $sess);
$event->trigger(); $event->trigger();

2
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 "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 "83.3%" "text" should exist in the "Maximum possible percentage:" "table_row"
And I log out And I log out
Loading…
Cancel
Save