diff --git a/lang/en/sortvoting.php b/lang/en/sortvoting.php index 57ccf51..dcb4bad 100644 --- a/lang/en/sortvoting.php +++ b/lang/en/sortvoting.php @@ -46,15 +46,15 @@ $string['option'] = 'Option'; $string['optionno'] = 'Option {no}'; $string['options'] = 'Options'; -$string['position'] = 'Position'; $string['pluginadministration'] = 'Preference Sort Voting administration'; $string['pluginname'] = 'Preference Sort Voting'; +$string['position'] = 'Position'; $string['privacy'] = 'Privacy of results'; $string['privacy:metadata:sortvoting_answers'] = 'Information about the user\'s votes for a given Preference Sort Voting activity'; -$string['privacy:metadata:sortvoting_answers:sortvotingid'] = 'The ID of the Preference Sort Voting activity'; $string['privacy:metadata:sortvoting_answers:optionid'] = 'The ID of the option that the user sorted.'; -$string['privacy:metadata:sortvoting_answers:userid'] = 'The ID of the user answering this Preference Sort Voting activity'; +$string['privacy:metadata:sortvoting_answers:sortvotingid'] = 'The ID of the Preference Sort Voting activity'; $string['privacy:metadata:sortvoting_answers:timemodified'] = 'The timestamp indicating when the vote was modified by the user'; +$string['privacy:metadata:sortvoting_answers:userid'] = 'The ID of the user answering this Preference Sort Voting activity'; $string['responses'] = 'Responses'; $string['sortoptions'] = 'Preference options'; $string['sortoptions_help'] = 'Here is where you specify the options that participants have to sort with their preferences. diff --git a/tests/lib_test.php b/tests/lib_test.php index 7000375..5ed36bd 100644 --- a/tests/lib_test.php +++ b/tests/lib_test.php @@ -31,14 +31,14 @@ * @copyright 2023 Odei Alba * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class lib_test extends \externallib_advanced_testcase { +final class lib_test extends \externallib_advanced_testcase { /** * Tests events after sortvoting is viewed. * * @covers ::sortvoting_view * @return void */ - public function test_sortvoting_view() { + public function test_sortvoting_view(): void { global $CFG; $this->resetAfterTest(); @@ -76,7 +76,7 @@ public function test_sortvoting_view() { * @covers ::mod_sortvoting_get_completion_active_rule_descriptions * @return void */ - public function test_mod_sortvoting_completion_get_active_rule_descriptions() { + public function test_mod_sortvoting_completion_get_active_rule_descriptions(): void { $this->resetAfterTest(); $this->setAdminUser(); diff --git a/tests/privacy/provider_test.php b/tests/privacy/provider_test.php index 6e6b178..0f6bcaf 100644 --- a/tests/privacy/provider_test.php +++ b/tests/privacy/provider_test.php @@ -27,7 +27,7 @@ * @copyright 2023 Odei Alba * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class provider_test extends \core_privacy\tests\provider_testcase { +final class provider_test extends \core_privacy\tests\provider_testcase { /** @var stdClass The student object. */ protected $student; @@ -92,7 +92,7 @@ protected function setUp(): void { * Test for provider::get_metadata(). * @covers ::get_metadata */ - public function test_get_metadata() { + public function test_get_metadata(): void { $collection = new collection('mod_sortvoting'); $newcollection = provider::get_metadata($collection); $itemcollection = $newcollection->get_collection(); @@ -114,7 +114,7 @@ public function test_get_metadata() { * Test for provider::get_contexts_for_userid(). * @covers ::get_contexts_for_userid */ - public function test_get_contexts_for_userid() { + public function test_get_contexts_for_userid(): void { $cm = get_coursemodule_from_instance('sortvoting', $this->sortvoting->id); $contextlist = provider::get_contexts_for_userid($this->student->id); @@ -128,7 +128,7 @@ public function test_get_contexts_for_userid() { * Test for provider::export_user_data(). * @covers ::export_user_data */ - public function test_export_for_context() { + public function test_export_for_context(): void { $cm = get_coursemodule_from_instance('sortvoting', $this->sortvoting->id); $cmcontext = \context_module::instance($cm->id); @@ -142,7 +142,7 @@ public function test_export_for_context() { * Test for provider::delete_data_for_all_users_in_context(). * @covers ::delete_data_for_all_users_in_context */ - public function test_delete_data_for_all_users_in_context() { + public function test_delete_data_for_all_users_in_context(): void { global $DB; $sortvoting = $this->sortvoting; @@ -190,7 +190,7 @@ public function test_delete_data_for_all_users_in_context() { * Test for provider::delete_data_for_user(). * @covers ::delete_data_for_user */ - public function test_delete_data_for_user_() { + public function test_delete_data_for_user(): void { global $DB; $sortvoting = $this->sortvoting; @@ -283,7 +283,7 @@ public function test_delete_data_for_user_() { * Test for provider::get_users_in_context(). * @covers ::get_users_in_context */ - public function test_get_users_in_context() { + public function test_get_users_in_context(): void { $cm = get_coursemodule_from_instance('sortvoting', $this->sortvoting->id); $cmcontext = \context_module::instance($cm->id); @@ -300,7 +300,7 @@ public function test_get_users_in_context() { * Test for provider::get_users_in_context() with invalid context type. * @covers ::get_users_in_context */ - public function test_get_users_in_context_invalid_context_type() { + public function test_get_users_in_context_invalid_context_type(): void { $systemcontext = \context_system::instance(); $userlist = new \core_privacy\local\request\userlist($systemcontext, 'mod_sortvoting'); @@ -313,7 +313,7 @@ public function test_get_users_in_context_invalid_context_type() { * Test for provider::delete_data_for_users(). * @covers ::delete_data_for_users */ - public function test_delete_data_for_users() { + public function test_delete_data_for_users(): void { global $DB; $sortvoting = $this->sortvoting;