MDL-68853 mod_h5pactivity: Whitespace fix

This commit is contained in:
Andrew Nicols 2021-02-17 12:02:53 +08:00
parent 57e233e742
commit 243262d940
2 changed files with 6 additions and 9 deletions

View File

@ -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,

View File

@ -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 {
],
];
}
}