Skip to content

Commit cc17233

Browse files
committed
Linting fixes with phpbf
1 parent ff8b2bf commit cc17233

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

classes/external/check_feedback_status.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,12 @@ class check_feedback_status extends external_api {
4242
public static function execute_parameters(): external_function_parameters {
4343
return new external_function_parameters([
4444
'assignmentid' => new external_value(PARAM_INT, 'The assignment instance id'),
45-
'userid' => new external_value(PARAM_INT, 'The user id to check feedback for, 0 to check all pending tasks',
46-
VALUE_DEFAULT, 0),
45+
'userid' => new external_value(
46+
PARAM_INT,
47+
'The user id to check feedback for, 0 to check all pending tasks',
48+
VALUE_DEFAULT,
49+
0
50+
),
4751
]);
4852
}
4953

@@ -73,7 +77,7 @@ public static function execute(int $assignmentid, int $userid = 0): array {
7377

7478
if ($params['userid'] > 0) {
7579
// Per-user mode: check if feedback exists for a specific user.
76-
$canview = ($params['userid'] == $GLOBALS['USER']->id)
80+
$canview = ($params['userid'] == $globals['USER']->id)
7781
|| has_capability('mod/assign:grade', $context);
7882
if (!$canview) {
7983
throw new \required_capability_exception($context, 'mod/assign:grade', 'nopermissions', '');
@@ -105,7 +109,7 @@ public static function execute(int $assignmentid, int $userid = 0): array {
105109
'pattern' => '%"assignment":' . $params['assignmentid'] . '%',
106110
]);
107111

108-
// feedbackexists=true means "done" (no more pending tasks).
112+
// The feedbackexists=true item means "done" (no more pending tasks).
109113
return ['feedbackexists' => !$pending];
110114
}
111115

classes/task/process_feedback_adhoc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ private function get_submission_record(int $assignmentid, int $userid) {
9090
*
9191
* @param object|false $record The submission record.
9292
* @param string $triggeredby How the task was triggered: 'auto' (observer) or 'manual' (teacher).
93-
* @param \assign $assign The assign instance.
93+
* @param \assign|null $assign The assign instance.
9494
*/
9595
private function generate_feedback($record, string $triggeredby = 'manual', ?\assign $assign = null): void {
9696
global $DB, $CFG;

locallib.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function get_editor_options(): array {
6868
*/
6969
public function get_settings(MoodleQuickForm $mform): void {
7070

71-
// ai_manager infobox: data sharing notice for teachers configuring the prompt.
71+
// AI manager infobox: data sharing notice for teachers configuring the prompt.
7272
if (get_config('assignfeedback_aif', 'backend') === 'local_ai_manager') {
7373
global $PAGE, $USER;
7474
$mform->addElement('html', '<div data-aif="aisettingsinfo"></div>');
@@ -236,7 +236,7 @@ public function set_editor_text($name, $value, $gradeid): bool {
236236
public function get_form_elements_for_user($grade, MoodleQuickForm $mform, stdClass $data, $userid): bool {
237237
global $PAGE, $USER;
238238

239-
// ai_manager widgets: infobox (data sharing notice) and quota.
239+
// AI manager widgets: infobox (data sharing notice) and quota.
240240
if (get_config('assignfeedback_aif', 'backend') === 'local_ai_manager') {
241241
$mform->addElement('html', '<div data-aif="aiinfo"></div>');
242242
$mform->addElement('html', '<div data-aif="aiuserquota" class="mb-2"></div>');

0 commit comments

Comments
 (0)