diff --git a/lang/en/local_aspiredu.php b/lang/en/local_aspiredu.php index 2bbd131..020ed71 100755 --- a/lang/en/local_aspiredu.php +++ b/lang/en/local_aspiredu.php @@ -26,30 +26,28 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -$string['pluginname'] = 'AspirEDU'; -$string['coursesettings'] = 'AspirEDU course settings'; -$string['coursestartdate'] = 'Course start date'; +$string['adminacc'] = 'Only Administrators with account'; +$string['adminacccinstcourse'] = 'Administrators with account and Instructors with course'; +$string['adminacccourse'] = 'Only Administrators with account plus course'; +$string['adminacccourseinstcourse'] = 'Administrators with account plus course and Instructors with course'; +$string['admincourseinstcourse'] = 'Administrators with course and instructors with course'; +$string['aspiredu:inaccessmanagement'] = 'Available as admin in Dropout Detective and Instructor Insight'; +$string['aspiredu:viewdropoutdetective'] = 'View Dropout Detective'; +$string['aspiredu:viewinstructorinsight'] = 'View Instructor Insight'; $string['courseenddate'] = 'Course end date'; $string['courseenddaterror'] = 'The end date must be higher than the start date'; +$string['coursesettings'] = 'AspirEDU course settings'; +$string['coursestartdate'] = 'Course start date'; +$string['disabled'] = 'No links'; $string['dropoutdetective'] = 'Dropout Detective'; $string['dropoutdetectivelinks'] = 'Dropout Detective links'; $string['dropoutdetectiveurl'] = 'Dropout Detective URL'; +$string['instcourse'] = 'Only instructors with course'; $string['instructorinsight'] = 'Instructor Insight'; $string['instructorinsightlinks'] = 'Instructor Insight links'; $string['instructorinsighturl'] = 'Instructor Insight URL'; $string['key'] = 'Key'; -$string['secret'] = 'Secret'; -$string['disabled'] = 'No links'; -$string['adminacccourseinstcourse'] = 'Administrators with account plus course and Instructors with course'; -$string['adminacccinstcourse'] = 'Administrators with account and Instructors with course'; -$string['admincourseinstcourse'] = 'Administrators with course and instructors with course'; -$string['adminacccourse'] = 'Only Administrators with account plus course'; -$string['adminacc'] = 'Only Administrators with account'; -$string['instcourse'] = 'Only instructors with course'; -$string['aspiredu:viewdropoutdetective'] = 'View Dropout Detective'; -$string['aspiredu:viewinstructorinsight'] = 'View Instructor Insight'; -$string['aspiredu:inaccessmanagement'] = 'Available as admin in Dropout Detective and Instructor Insight'; -// Privacy. +$string['pluginname'] = 'AspirEDU'; $string['privacy:metadata:aspiredu_provider'] = 'The AspirEDU plugin provides user information and context to the AspirEDU servers.'; $string['privacy:metadata:aspiredu_provider:courseid'] = 'The ID of the course the user is enrolled.'; $string['privacy:metadata:aspiredu_provider:discussionid'] = 'The ID of the discussion the user has participated.'; @@ -61,3 +59,4 @@ $string['privacy:metadata:aspiredu_provider:lastname'] = 'The last name of the user.'; $string['privacy:metadata:aspiredu_provider:userid'] = 'The ID of the user.'; $string['privacy:metadata:aspiredu_provider:username'] = 'The username of the user.'; +$string['secret'] = 'Secret'; diff --git a/tests/core_course_get_courses_paginated_test.php b/tests/core_course_get_courses_paginated_test.php index 5a78a6e..c7e3223 100644 --- a/tests/core_course_get_courses_paginated_test.php +++ b/tests/core_course_get_courses_paginated_test.php @@ -44,7 +44,7 @@ * Tests for core_course_get_courses_paginated WS function. * @covers \local_aspiredu\external\core_course_get_courses_paginated */ -class core_course_get_courses_paginated_test extends externallib_advanced_testcase { +final class core_course_get_courses_paginated_test extends externallib_advanced_testcase { protected function setUp(): void { global $CFG; @@ -57,7 +57,7 @@ protected function setUp(): void { * Test calling the function. * @runInSeparateProcess */ - public function test_get_courses() { + public function test_get_courses(): void { global $DB; $generatedcourses = []; @@ -211,7 +211,7 @@ public function test_get_courses_customfields(): void { * Test calling the function where the user does not have required capability on any courses. * @runInSeparateProcess */ - public function test_get_courses_without_capability() { + public function test_get_courses_without_capability(): void { $this->resetAfterTest(); $course1 = static::getDataGenerator()->create_course(); diff --git a/tests/core_grades_get_course_grades_test.php b/tests/core_grades_get_course_grades_test.php index 7728f9a..3ddd72a 100644 --- a/tests/core_grades_get_course_grades_test.php +++ b/tests/core_grades_get_course_grades_test.php @@ -41,7 +41,7 @@ * Tests for core_grades_get_course_grades WS function. * @covers \local_aspiredu\external\core_grades_get_course_grades */ -class core_grades_get_course_grades_test extends externallib_advanced_testcase { +final class core_grades_get_course_grades_test extends externallib_advanced_testcase { protected function setUp(): void { $this->resetAfterTest(); } @@ -50,7 +50,7 @@ protected function setUp(): void { * Test calling the function. * @runInSeparateProcess */ - public function test_get_courses() { + public function test_get_courses(): void { $course = self::getDataGenerator()->create_course(); $student1 = static::getDataGenerator()->create_and_enrol($course); $student2 = static::getDataGenerator()->create_and_enrol($course); diff --git a/tests/core_grades_get_grades_test.php b/tests/core_grades_get_grades_test.php index 6405abe..3c4eaa0 100755 --- a/tests/core_grades_get_grades_test.php +++ b/tests/core_grades_get_grades_test.php @@ -50,7 +50,7 @@ * Tests for core_grades_get_grades WS function. * @covers \local_aspiredu\external\core_grades_get_grades */ -class core_grades_get_grades_test extends externallib_advanced_testcase { +final class core_grades_get_grades_test extends externallib_advanced_testcase { /** * Load initial test information @@ -150,7 +150,7 @@ protected function load_test_data($assignmentname, $student1rawgrade, $student2r * Test calling the function. * @runInSeparateProcess */ - public function test_get_grades() { + public function test_get_grades(): void { global $CFG; $this->resetAfterTest(); diff --git a/tests/get_plugin_info_test.php b/tests/get_plugin_info_test.php index 49a153d..657ee9b 100644 --- a/tests/get_plugin_info_test.php +++ b/tests/get_plugin_info_test.php @@ -41,12 +41,12 @@ * Tests for get_plugin_info WS function. * @covers \local_aspiredu\external\get_plugin_info */ -class get_plugin_info_test extends externallib_advanced_testcase { +final class get_plugin_info_test extends externallib_advanced_testcase { /** * Test calling the function. * @runInSeparateProcess */ - public function test_get_plugin_info() { + public function test_get_plugin_info(): void { $this->resetAfterTest(); static::setAdminUser(); diff --git a/tests/get_role_users_test.php b/tests/get_role_users_test.php index e2ac49d..46efe22 100644 --- a/tests/get_role_users_test.php +++ b/tests/get_role_users_test.php @@ -32,13 +32,13 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \local_aspiredu\external\get_role_users */ -class get_role_users_test extends \externallib_advanced_testcase { +final class get_role_users_test extends \externallib_advanced_testcase { /** * Test calling the function. * @runInSeparateProcess */ - public function test_get_role_users() { + public function test_get_role_users(): void { $this->resetAfterTest(); static::setAdminUser(); diff --git a/tests/get_site_admins_test.php b/tests/get_site_admins_test.php index b760202..c14c5e8 100644 --- a/tests/get_site_admins_test.php +++ b/tests/get_site_admins_test.php @@ -32,13 +32,13 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \local_aspiredu\external\get_site_admins */ -class get_site_admins_test extends \externallib_advanced_testcase { +final class get_site_admins_test extends \externallib_advanced_testcase { /** * Test calling the function. * @runInSeparateProcess */ - public function test_get_site_admins() { + public function test_get_site_admins(): void { $this->resetAfterTest(); static::setAdminUser(); diff --git a/tests/get_users_by_capabilities_test.php b/tests/get_users_by_capabilities_test.php index 65bfd34..4524ca3 100644 --- a/tests/get_users_by_capabilities_test.php +++ b/tests/get_users_by_capabilities_test.php @@ -32,13 +32,13 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later/** * @covers \local_aspiredu\external\get_users_by_capabilities */ -class get_users_by_capabilities_test extends \externallib_advanced_testcase { +final class get_users_by_capabilities_test extends \externallib_advanced_testcase { /** * Test calling the function. * @runInSeparateProcess */ - public function test_get_users_by_capabilities() { + public function test_get_users_by_capabilities(): void { $this->resetAfterTest(); static::setAdminUser(); diff --git a/tests/get_users_by_roles_test.php b/tests/get_users_by_roles_test.php index b3a4e54..5c8c214 100644 --- a/tests/get_users_by_roles_test.php +++ b/tests/get_users_by_roles_test.php @@ -32,13 +32,13 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \local_aspiredu\external\get_users_by_roles */ -class get_users_by_roles_test extends \externallib_advanced_testcase { +final class get_users_by_roles_test extends \externallib_advanced_testcase { /** * Test calling the function. * @runInSeparateProcess */ - public function test_get_users_by_capabilities() { + public function test_get_users_by_capabilities(): void { $this->resetAfterTest(); static::setAdminUser(); diff --git a/tests/gradereport_user_get_grade_items_test.php b/tests/gradereport_user_get_grade_items_test.php index 2b32a97..1e777e2 100644 --- a/tests/gradereport_user_get_grade_items_test.php +++ b/tests/gradereport_user_get_grade_items_test.php @@ -47,13 +47,13 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @covers \local_aspiredu\external\gradereport_user_get_grade_items::execute */ -class gradereport_user_get_grade_items_test extends externallib_advanced_testcase { +final class gradereport_user_get_grade_items_test extends externallib_advanced_testcase { /** * Test calling the function. * @runInSeparateProcess */ - public function test_get_grade_items_force_inclusion_range_percentage() { + public function test_get_grade_items_force_inclusion_range_percentage(): void { global $DB; $this->resetAfterTest(); diff --git a/tests/mod_forum_get_forum_discussion_posts_test.php b/tests/mod_forum_get_forum_discussion_posts_test.php index a120914..33026d2 100755 --- a/tests/mod_forum_get_forum_discussion_posts_test.php +++ b/tests/mod_forum_get_forum_discussion_posts_test.php @@ -49,13 +49,13 @@ * Tests for mod_forum_get_forum_discussion_posts WS function. * @covers \local_aspiredu\external\mod_forum_get_forum_discussion_posts */ -class mod_forum_get_forum_discussion_posts_test extends externallib_advanced_testcase { +final class mod_forum_get_forum_discussion_posts_test extends externallib_advanced_testcase { /** * Test calling the function. * @runInSeparateProcess */ - public function test_mod_forum_get_forum_discussion_posts() { + public function test_mod_forum_get_forum_discussion_posts(): void { global $CFG, $PAGE; $this->resetAfterTest(); @@ -253,7 +253,7 @@ public function test_mod_forum_get_forum_discussion_posts() { * Test calling the function for deleted posts. * @runInSeparateProcess */ - public function test_mod_forum_get_forum_discussion_posts_deleted() { + public function test_mod_forum_get_forum_discussion_posts_deleted(): void { $this->resetAfterTest(); $generator = self::getDataGenerator()->get_plugin_generator('mod_forum'); @@ -330,7 +330,7 @@ public function test_mod_forum_get_forum_discussion_posts_deleted() { * Test calling the function. * @runInSeparateProcess */ - public function test_mod_forum_get_forum_discussion_posts_qanda() { + public function test_mod_forum_get_forum_discussion_posts_qanda(): void { global $CFG, $DB; $this->resetAfterTest(); diff --git a/tests/privacy/provider_test.php b/tests/privacy/provider_test.php index 5c0c342..4ac1d55 100644 --- a/tests/privacy/provider_test.php +++ b/tests/privacy/provider_test.php @@ -36,8 +36,8 @@ * Test for provider::get_metadata(). * @covers \local_aspiredu\privacy\provider */ -class provider_test extends provider_testcase { - public function test_get_metadata() { +final class provider_test extends provider_testcase { + public function test_get_metadata(): void { $collection = new collection('local_aspiredu'); $collection = provider::get_metadata($collection); static::assertNotEmpty($collection); diff --git a/tests/report_log_get_log_records_test.php b/tests/report_log_get_log_records_test.php index 8ce5932..813232b 100644 --- a/tests/report_log_get_log_records_test.php +++ b/tests/report_log_get_log_records_test.php @@ -42,7 +42,7 @@ * Tests for report_log_get_log_records WS function. * @covers \local_aspiredu\external\report_log_get_log_records */ -class report_log_get_log_records_test extends externallib_advanced_testcase { +final class report_log_get_log_records_test extends externallib_advanced_testcase { /** * Basic setup for these tests. */ @@ -59,7 +59,7 @@ protected function setUp(): void { * Test calling the function. * @runInSeparateProcess */ - public function test_get_courses() { + public function test_get_courses(): void { global $DB; static::setAdminUser();