diff --git a/.travis.yml b/.travis.yml index d9d6532..439a37e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,6 +24,7 @@ php: env: global: - MOODLE_BRANCH=master + - MUSTACHE_IGNORE_NAMES=mobile_teacher_form.mustache matrix: - DB=pgsql - DB=mysqli diff --git a/externallib.php b/externallib.php index 6f8e354..50f65ef 100644 --- a/externallib.php +++ b/externallib.php @@ -531,7 +531,8 @@ class mod_attendance_external extends external_api { // TODO: Verify statusset and statusid. - return attendance_handler::update_user_status($params['sessionid'], $params['studentid'], $params['takenbyid'], $params['statusid'], $params['statusset']); + return attendance_handler::update_user_status($params['sessionid'], $params['studentid'], $params['takenbyid'], + $params['statusid'], $params['statusset']); } /** diff --git a/tests/behat/attendance_mod.feature b/tests/behat/attendance_mod.feature index 5d582db..d42db80 100644 --- a/tests/behat/attendance_mod.feature +++ b/tests/behat/attendance_mod.feature @@ -114,4 +114,4 @@ Feature: Teachers and Students can record session attendance And the field "id_ident_department" matches value "" # Removed dependency on behat_download to allow automated Travis CI tests to pass. - # It would be good to add these back at some point. \ No newline at end of file + # It would be good to add these back at some point. diff --git a/tests/behat/defaultstatus.feature b/tests/behat/defaultstatus.feature index b3b0aaa..5af3534 100644 --- a/tests/behat/defaultstatus.feature +++ b/tests/behat/defaultstatus.feature @@ -27,4 +27,4 @@ Feature: Admin can set default status set for use in new attendance | Name | Attendance1 | And I follow "Attendance1" And I follow "Status set" - Then the field with xpath "//*[@id='preferencesform']/table/tbody/tr[2]/td[3]/input" matches value "customstatusdescription" \ No newline at end of file + Then the field with xpath "//*[@id='preferencesform']/table/tbody/tr[2]/td[3]/input" matches value "customstatusdescription" diff --git a/tests/behat/preferences.feature b/tests/behat/preferences.feature index 169db77..ae529db 100644 --- a/tests/behat/preferences.feature +++ b/tests/behat/preferences.feature @@ -53,4 +53,4 @@ Feature: Teachers can't change status variables to have empty acronyms or descri Then I should see "Empty acronyms are not allowed" in the "//*[@id='preferencesform']/table/tbody/tr[1]/td[2]/p" "xpath_element" And I should see "Empty descriptions are not allowed" in the "//*[@id='preferencesform']/table/tbody/tr[1]/td[3]/p" "xpath_element" And I should see "Empty acronyms are not allowed" in the "//*[@id='preferencesform']/table/tbody/tr[3]/td[2]/p" "xpath_element" - And I should see "Empty descriptions are not allowed" in the "//*[@id='preferencesform']/table/tbody/tr[3]/td[3]/p" "xpath_element" \ No newline at end of file + And I should see "Empty descriptions are not allowed" in the "//*[@id='preferencesform']/table/tbody/tr[3]/td[3]/p" "xpath_element" diff --git a/tests/behat/report.feature b/tests/behat/report.feature index d5a506f..b9da498 100644 --- a/tests/behat/report.feature +++ b/tests/behat/report.feature @@ -213,4 +213,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 \ No newline at end of file + And I log out diff --git a/tests/externallib_test.php b/tests/externallib_test.php index 2637b1e..aefcd11 100644 --- a/tests/externallib_test.php +++ b/tests/externallib_test.php @@ -219,7 +219,8 @@ class mod_attendance_external_testcase extends externallib_advanced_testcase { $status = array_pop($sessioninfo['statuses']); $statusset = $sessioninfo['statusset']; - $result = mod_attendance_external::update_user_status($session['id'], $student['id'], $this->teacher->id, $status['id'], $statusset); + $result = mod_attendance_external::update_user_status($session['id'], $student['id'], $this->teacher->id, + $status['id'], $statusset); $result = external_api::clean_returnvalue(mod_attendance_external::update_user_status_returns(), $result); $sessioninfo = attendance_handler::get_session($session['id']); @@ -317,7 +318,8 @@ class mod_attendance_external_testcase extends externallib_advanced_testcase { // Create attendance with separate groups mode. $attendancesepgroups = mod_attendance_external::add_attendance($course->id, 'sepgroups', 'test', SEPARATEGROUPS); - $attendancesepgroups = external_api::clean_returnvalue(mod_attendance_external::add_attendance_returns(), $attendancesepgroups); + $attendancesepgroups = external_api::clean_returnvalue(mod_attendance_external::add_attendance_returns(), + $attendancesepgroups); // Check attendance exist. $this->assertCount(1, $DB->get_records('attendance', ['course' => $course->id])); @@ -358,7 +360,8 @@ class mod_attendance_external_testcase extends externallib_advanced_testcase { $this->setUser($teacher); // Create attendance with no groups mode. - $attendancenogroups = mod_attendance_external::add_attendance($course->id, 'nogroups', 'test', NOGROUPS); + $attendancenogroups = mod_attendance_external::add_attendance($course->id, 'nogroups', + 'test', NOGROUPS); $attendancenogroups = external_api::clean_returnvalue(mod_attendance_external::add_attendance_returns(), $attendancenogroups); // Check attendance exist. @@ -384,7 +387,8 @@ class mod_attendance_external_testcase extends externallib_advanced_testcase { // Create attendance with visible groups mode. $attendancevisgroups = mod_attendance_external::add_attendance($course->id, 'visgroups', 'test', VISIBLEGROUPS); - $attendancevisgroups = external_api::clean_returnvalue(mod_attendance_external::add_attendance_returns(), $attendancevisgroups); + $attendancevisgroups = external_api::clean_returnvalue(mod_attendance_external::add_attendance_returns(), + $attendancevisgroups); // Check attendance exist. $this->assertCount(1, $DB->get_records('attendance', ['course' => $course->id]));