diff --git a/grade/report/singleview/classes/local/screen/grade.php b/grade/report/singleview/classes/local/screen/grade.php index fcfdb701329..be45f79a96d 100644 --- a/grade/report/singleview/classes/local/screen/grade.php +++ b/grade/report/singleview/classes/local/screen/grade.php @@ -44,13 +44,22 @@ defined('MOODLE_INTERNAL') || die; */ class grade extends tablelike implements selectable_items, filterable_items { - /** @var int $totalitemcount Used for paging */ + /** + * Used for paging + * @var int $totalitemcount + */ private int $totalitemcount = 0; - /** @var bool $requiresextra True if this is a manual grade item */ + /** + * True if this is a manual grade item + * @var bool $requiresextra + */ private bool $requiresextra = false; - /** @var bool $requirepaging True if there are more users than our limit. */ + /** + * True if there are more users than our limit. + * @var bool $requirepaging + */ private bool $requirespaging = true; /** diff --git a/grade/report/singleview/classes/local/screen/screen.php b/grade/report/singleview/classes/local/screen/screen.php index 4f640f02e4c..d12285f956e 100644 --- a/grade/report/singleview/classes/local/screen/screen.php +++ b/grade/report/singleview/classes/local/screen/screen.php @@ -43,28 +43,52 @@ defined('MOODLE_INTERNAL') || die; */ abstract class screen { - /** @var int $courseid The id of the course */ + /** + * The id of the course + * @var int $courseid + */ protected int $courseid; - /** @var int|null $itemid Either a user id or a grade_item id */ + /** + * Either a user id or a grade_item id + * @var int|null $itemid + */ protected ?int $itemid; - /** @var int $groupid The currently set groupid (if set) */ + /** + * The currently set groupid (if set) + * @var int $groupid + */ protected $groupid; - /** @var context_course $context The course context */ + /** + * The course context + * @var context_course $context + */ protected context_course $context; - /** @var int $page The page number */ + /** + * The page number + * @var int $page + */ protected int $page; - /** @var int $perpage Results per page */ + /** + * Results per page + * @var int $perpage + */ protected int $perpage; - /** @var array $items List of items on the page, they could be users or grade_items */ + /** + * List of items on the page, they could be users or grade_items + * @var array $items + */ protected array $items; - /** @var array $validperpage List of allowed values for 'perpage' setting */ + /** + * List of allowed values for 'perpage' setting + * @var array $validperpage + */ protected static array $validperpage = [20, 50, 100, 200, 400, 1000, 5000]; /** @@ -222,21 +246,21 @@ abstract class screen { * * @param boolean $selfitemisempty True if no item has been selected yet. */ - public abstract function init(bool $selfitemisempty = false); + abstract public function init(bool $selfitemisempty = false); /** * Get the type of items in the list. * * @return string */ - public abstract function item_type(): string; + abstract public function item_type(): string; /** * Get the entire screen as a string. * * @return string */ - public abstract function html(): string; + abstract public function html(): string; /** * Does this screen support paging? diff --git a/grade/report/singleview/classes/local/screen/select.php b/grade/report/singleview/classes/local/screen/select.php index 274f5031309..0e1983fa88c 100644 --- a/grade/report/singleview/classes/local/screen/select.php +++ b/grade/report/singleview/classes/local/screen/select.php @@ -105,7 +105,7 @@ class select extends screen { $url = new moodle_url('/grade/report/singleview/index.php', $params); $select = new \single_select($url, 'itemid', $options, '', ['' => $screen->select_label()]); - $select->set_label($screen->select_label(), ['class'=>'accesshide']); + $select->set_label($screen->select_label(), ['class' => 'accesshide']); $html .= $OUTPUT->render($select); } $html = $OUTPUT->container($html, 'selectitems'); diff --git a/grade/report/singleview/classes/local/screen/tablelike.php b/grade/report/singleview/classes/local/screen/tablelike.php index d4a41b0c66f..3f0ce107450 100644 --- a/grade/report/singleview/classes/local/screen/tablelike.php +++ b/grade/report/singleview/classes/local/screen/tablelike.php @@ -41,29 +41,38 @@ defined('MOODLE_INTERNAL') || die; */ abstract class tablelike extends screen { - /** @var array $headers A list of table headers */ + /** + * A list of table headers + * @var array $headers + */ protected array $headers = []; - /** @var array $initerrors A list of errors that mean we should not show the table */ + /** + * A list of errors that mean we should not show the table + * @var array $initerrors + */ protected array $initerrors = []; - /** @var array $definition Describes the columns in the table */ + /** + * Describes the columns in the table + * @var array $definition + */ protected array $definition = []; /** * Format a row of the table * - * @param mixed $item + * @var mixed $item * @return array */ - public abstract function format_line($item): array; + abstract public function format_line($item): array; /** * Get the summary for this table. * * @return string */ - public abstract function summary(): string; + abstract public function summary(): string; /** * Get the table headers diff --git a/grade/report/singleview/classes/local/screen/user.php b/grade/report/singleview/classes/local/screen/user.php index f2e896af287..733d7efbfe0 100644 --- a/grade/report/singleview/classes/local/screen/user.php +++ b/grade/report/singleview/classes/local/screen/user.php @@ -152,7 +152,7 @@ class user extends tablelike implements selectable_items { * @param grade_item $item * @return array */ - public function format_line($item): array{ + public function format_line($item): array { global $OUTPUT; $grade = $this->fetch_grade_or_default($item, $this->item->id); diff --git a/grade/report/singleview/classes/local/ui/dropdown_attribute.php b/grade/report/singleview/classes/local/ui/dropdown_attribute.php index ebdb4bb9fcd..d314c45fd93 100644 --- a/grade/report/singleview/classes/local/ui/dropdown_attribute.php +++ b/grade/report/singleview/classes/local/ui/dropdown_attribute.php @@ -35,13 +35,22 @@ defined('MOODLE_INTERNAL') || die; */ class dropdown_attribute extends element { - /** @var string $selected Who is selected ? */ + /** + * Who is selected? + * @var string $selected + */ private string $selected; - /** @var array $options List of options ? */ + /** + * List of options + * @var array $options + */ private array $options; - /** @var bool $isdisabled Is this input disabled. */ + /** + * Is this input disabled. + * @var bool $isdisabled + */ private bool $isdisabled; /** diff --git a/grade/report/singleview/classes/local/ui/element.php b/grade/report/singleview/classes/local/ui/element.php index 9594bb1e21c..b9173fee395 100644 --- a/grade/report/singleview/classes/local/ui/element.php +++ b/grade/report/singleview/classes/local/ui/element.php @@ -35,13 +35,22 @@ defined('MOODLE_INTERNAL') || die; */ abstract class element { - /** @var string $name The first bit of the name for this input. */ + /** + * The first bit of the name for this input. + * @var string $name + */ public string $name; - /** @var string $value The value for this input. */ + /** + * The value for this input. + * @var string $value + */ public string $value; - /** @var string $label The form label for this input. */ + /** + * The form label for this input. + * @var string $label + */ public string $label; /** diff --git a/grade/report/singleview/classes/local/ui/exclude.php b/grade/report/singleview/classes/local/ui/exclude.php index 6bd9b4ba4bc..35640c7da92 100644 --- a/grade/report/singleview/classes/local/ui/exclude.php +++ b/grade/report/singleview/classes/local/ui/exclude.php @@ -37,10 +37,16 @@ use grade_grade; */ class exclude extends grade_attribute_format implements be_checked, be_disabled { - /** @var string $name The name of the input */ + /** + * The name of the input + * @var string $name + */ public string $name = 'exclude'; - /** @var bool $disabled Is the checkbox disabled? */ + /** + * Is the checkbox disabled? + * @var bool $disabled + */ public $disabled = false; /** diff --git a/grade/report/singleview/classes/local/ui/feedback.php b/grade/report/singleview/classes/local/ui/feedback.php index 31ea94fce91..582ce0bfa6f 100644 --- a/grade/report/singleview/classes/local/ui/feedback.php +++ b/grade/report/singleview/classes/local/ui/feedback.php @@ -35,7 +35,10 @@ defined('MOODLE_INTERNAL') || die; */ class feedback extends grade_attribute_format implements unique_value, be_disabled { - /** @var string $name Name of this input */ + /** + * Name of this input + * @var string $name + */ public string $name = 'feedback'; /** diff --git a/grade/report/singleview/classes/local/ui/finalgrade.php b/grade/report/singleview/classes/local/ui/finalgrade.php index d9a2a0017e0..ec81e20b6fa 100644 --- a/grade/report/singleview/classes/local/ui/finalgrade.php +++ b/grade/report/singleview/classes/local/ui/finalgrade.php @@ -36,7 +36,10 @@ use stdClass; */ class finalgrade extends grade_attribute_format implements unique_value, be_disabled { - /** @var string $name Name of this input */ + /** + * Name of this input + * @var string $name + */ public string $name = 'finalgrade'; /** diff --git a/grade/report/singleview/classes/local/ui/grade_attribute_format.php b/grade/report/singleview/classes/local/ui/grade_attribute_format.php index b3e67d17762..0ca72d41e68 100644 --- a/grade/report/singleview/classes/local/ui/grade_attribute_format.php +++ b/grade/report/singleview/classes/local/ui/grade_attribute_format.php @@ -37,13 +37,22 @@ defined('MOODLE_INTERNAL') || die; */ abstract class grade_attribute_format extends attribute_format implements unique_name { - /** @var string $name The first part of the name attribute of the form input */ + /** + * The first part of the name attribute of the form input + * @var string $name + */ public string $name; - /** @var null|string $label The label of the input */ + /** + * The label of the input + * @var null|string $label + */ public ?string $label; - /** @var grade_grade $grade The grade_grade of the input */ + /** + * The grade_grade of the input + * @var grade_grade $grade + */ public grade_grade $grade; /** @@ -70,5 +79,5 @@ abstract class grade_attribute_format extends attribute_format implements unique * @param string $value The value from the form. * @return string Any error message */ - public abstract function set(string $value); + abstract public function set(string $value); } diff --git a/grade/report/singleview/classes/local/ui/override.php b/grade/report/singleview/classes/local/ui/override.php index ccb13758e51..965ca702baa 100644 --- a/grade/report/singleview/classes/local/ui/override.php +++ b/grade/report/singleview/classes/local/ui/override.php @@ -35,7 +35,10 @@ defined('MOODLE_INTERNAL') || die; */ class override extends grade_attribute_format implements be_checked, be_disabled { - /** @var string $name The name for this input */ + /** + * The name for this input + * @var string $name + */ public string $name = 'override'; /** diff --git a/grade/report/singleview/classes/local/ui/text_attribute.php b/grade/report/singleview/classes/local/ui/text_attribute.php index aa121e80dd0..484e1df5397 100644 --- a/grade/report/singleview/classes/local/ui/text_attribute.php +++ b/grade/report/singleview/classes/local/ui/text_attribute.php @@ -35,7 +35,10 @@ defined('MOODLE_INTERNAL') || die; */ class text_attribute extends element { - /** @var bool $isdisabled Is this input disabled? */ + /** + * Is this input disabled? + * @var bool $isdisabled + */ private bool $isdisabled; /** diff --git a/grade/report/singleview/classes/report/singleview.php b/grade/report/singleview/classes/report/singleview.php index df0204c1e8f..1b8a858970e 100644 --- a/grade/report/singleview/classes/report/singleview.php +++ b/grade/report/singleview/classes/report/singleview.php @@ -74,7 +74,14 @@ class singleview extends grade_report { * @param int $itemid The id of the user or grade item * @param string|null $unused Used to be group id but that was removed and this is now unused. */ - public function __construct(int $courseid, object $gpr, context_course $context, string $itemtype, int $itemid, ?string $unused = null) { + public function __construct( + int $courseid, + object $gpr, + context_course $context, + string $itemtype, + int $itemid, + ?string $unused = null + ) { parent::__construct($courseid, $gpr, $context); $base = '/grade/report/singleview/index.php';