mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-68853 mod_h5pactivity: Whitespace fix
This commit is contained in:
parent
57e233e742
commit
243262d940
@ -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,
|
||||
|
@ -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 {
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user