diff --git a/mod/h5pactivity/classes/external/log_report_viewed.php b/mod/h5pactivity/classes/external/log_report_viewed.php index e20d606e647..7e182b5d780 100644 --- a/mod/h5pactivity/classes/external/log_report_viewed.php +++ b/mod/h5pactivity/classes/external/log_report_viewed.php @@ -58,8 +58,11 @@ class log_report_viewed extends external_api { return new external_function_parameters( [ 'h5pactivityid' => new external_value(PARAM_INT, 'h5p activity instance id'), - 'userid' => new external_value(PARAM_INT, - 'The user id to log attempt (null means only current user)', VALUE_DEFAULT), + 'userid' => new external_value( + PARAM_INT, + 'The user id to log attempt (null means only current user)', + VALUE_DEFAULT + ), 'attemptid' => new external_value(PARAM_INT, 'The attempt id', VALUE_DEFAULT), ] ); @@ -75,7 +78,6 @@ class log_report_viewed extends external_api { * @return array of warnings and status result */ public static function execute(int $h5pactivityid, int $userid = null, int $attemptid = null): stdClass { - $params = external_api::validate_parameters(self::execute_parameters(), [ 'h5pactivityid' => $h5pactivityid, 'userid' => $userid, diff --git a/mod/h5pactivity/tests/external/log_report_viewed.php b/mod/h5pactivity/tests/external/log_report_viewed.php index 773faccabdd..2372a229d7c 100644 --- a/mod/h5pactivity/tests/external/log_report_viewed.php +++ b/mod/h5pactivity/tests/external/log_report_viewed.php @@ -43,7 +43,6 @@ use externallib_advanced_testcase; * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class log_report_viewed_testcase extends externallib_advanced_testcase { - /** * Test the behaviour of log_report_viewed. * @@ -53,9 +52,7 @@ class log_report_viewed_testcase extends externallib_advanced_testcase { * @param string $loginuser the user which calls the webservice * @param string|null $participant the user to log the data */ - public function test_execute(int $enabletracking, int $reviewmode, string $loginuser, - ?string $participant): void { - + public function test_execute(int $enabletracking, int $reviewmode, string $loginuser, ?string $participant): void { $this->resetAfterTest(); $this->setAdminUser(); @@ -106,7 +103,6 @@ class log_report_viewed_testcase extends externallib_advanced_testcase { $this->assertEquals($cm->instance, $event->other['instanceid']); $this->assertEquals($user->id, $event->other['userid']); $this->assertEquals($attemptid, $event->other['attemptid']); - } /** @@ -124,5 +120,4 @@ class log_report_viewed_testcase extends externallib_advanced_testcase { ], ]; } - }