Skip to content

Commit

Permalink
Declared the dynamic properties in the class quizanon_grading_setting…
Browse files Browse the repository at this point in the history
…s_form; fixed short array syntax warnings
  • Loading branch information
lbailey-ucsf committed Jan 6, 2025
1 parent 84c2db2 commit 3fc5d30
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions classes/local/data/quizanon.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class quizanon extends base {
* @return array
*/
protected static function define_properties(): array {
return array(
return [
'quizid' => [
'type' => PARAM_INT,
'null' => NULL_NOT_ALLOWED,
Expand All @@ -62,6 +62,6 @@ protected static function define_properties(): array {
'type' => PARAM_TEXT,
'null' => NULL_NOT_ALLOWED,
],
);
];
}
}
4 changes: 2 additions & 2 deletions classes/local/data/quizanon_codes.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class quizanon_codes extends base {
* @return array
*/
protected static function define_properties(): array {
return array(
return [
'quizid' => [
'type' => PARAM_INT,
'null' => NULL_NOT_ALLOWED,
Expand All @@ -62,6 +62,6 @@ protected static function define_properties(): array {
'type' => PARAM_ALPHANUM,
'null' => NULL_NOT_ALLOWED,
],
);
];
}
}
12 changes: 6 additions & 6 deletions report/grading/gradingsettings_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,22 @@
*/
class quizanon_grading_settings_form extends moodleform {

/** Whether to include automatically graded attempts. */
/** @var bool Whether to include automatically graded attempts. */
protected bool $includeauto;

/** Hidden form options. */
/** @var array Hidden form options. */
protected array $hidden;

/** Counts of each type of quiz attempt. */
/** @var stdClass Counts of each type of quiz attempt. */
protected stdClass $counts;

/** Whether student names are displayed. */
/** @var bool Whether student names are displayed. */
protected bool $shownames;

/** Whether custom field values are displayed. */
/** @var bool Whether custom field values are displayed. */
protected bool $showcustomfields;

/** Context for the settings form. */
/** @var stdClass Context for the settings form. */
protected stdClass $context;

/**
Expand Down

0 comments on commit 3fc5d30

Please sign in to comment.