Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
gradereport_singleview\local\screen\grade Class Reference

The screen with a list of users. More...

Inheritance diagram for gradereport_singleview\local\screen\grade:
gradereport_singleview\local\screen\tablelike gradereport_singleview\local\screen\selectable_items gradereport_singleview\local\screen\filterable_items gradereport_singleview\local\screen\screen gradereport_singleview\local\ui\be_readonly

Public Member Functions

 bulk_insert ()
 Get the HTML for the bulk insert form.
 
 buttons (bool $disabled=false)
 Get the buttons for saving changes.
 
 definition ()
 Get the table definition.
 
 description ()
 Get the description of this page.
 
 display_group_selector ()
 Should we show the group selector?
 
 fetch_grade_or_default (grade_item $item, int $userid)
 Get the grade_grade.
 
 format_definition (grade_grade $grade)
 Get a element to generate the HTML for this table row.
 
 format_line ($item)
 Format a row in the table.
 
 format_link (string $screen, int $itemid, bool $display=null)
 Create a nice link from a thing (user or grade_item).
 
 headers ()
 Get the table headers.
 
 heading ()
 Get the heading for this page.
 
 html ()
 Get the HTML for the whole table.
 
 init ($selfitemisempty=false)
 Init this page.
 
 init (bool $selfitemisempty=false)
 Override this to init the screen.
 
 init_errors ()
 Get the list of errors.
 
 is_readonly ()
 Return true if this is read-only.
 
 item_range ()
 Get the range ui element for this grade_item.
 
 item_type ()
 Return the type of the things in this list.
 
 js ()
 Initialise the js for this screen.
 
 options ()
 Convert this list of items into an options list.
 
 original_definition ()
 Get the original settings for this item.
 
 original_headers ()
 Get the table headers.
 
 pager ()
 Get the pager for this page.
 
 perpage_select ()
 Allow selection of number of items to display per page.
 
 process ($data)
 Process the data from the form.
 
 select_label ()
 Get the label for the select box that chooses items for this page.
 
 set_definition (array $overwrite)
 Set the table definition.
 
 set_headers (array $overwrite)
 Set the table headers.
 
 set_init_error (string $mesg)
 Set an error detected while building the page.
 
 setup_structure ()
 Cache the grade_structure class.
 
 summary ()
 Get the summary for this table.
 
 supports_next_prev ()
 Should we show the next prev selector?
 
 supports_paging ()
 Does this page require paging?
 

Static Public Member Functions

static allowcategories ()
 True if $CFG->grade_overridecat is true.
 
static filter ($item)
 Filter the list excluding category items (if required)?
 

Public Attributes

grade_item bool $item
 Returns a grade_item instance or false if none found.
 
 $range
 

Protected Member Functions

 load_users ()
 Load a valid list of users for this gradebook as the screen "items".
 

Protected Attributes

context_course $context
 The course context $context.
 
stdClass $course
 To store course data.
 
int $courseid
 The id of the course $courseid.
 
array $definition = []
 Describes the columns in the table $definition.
 
int $groupid
 The currently set groupid (if set) $groupid.
 
array $headers = []
 A list of table headers $headers.
 
int $index
 Table tab index $index.
 
array $initerrors = []
 A list of errors that mean we should not show the table $initerrors.
 
int null $itemid
 Either a user id or a grade_item id $itemid.
 
array $items
 List of items on the page, they could be users or grade_items $items.
 
int $page
 The page number $page.
 
int $perpage
 Results per page $perpage.
 
grade_structure $structure
 General structure representing grade items in course.
 
int $total
 Total items $total.
 
 range
 To store UI element that generates a grade_item min/max range.
 

Static Protected Attributes

static int $maxperpage = 5000
 Maximum number of students that can be shown on one page.
 
static array $validperpage = [20, 100]
 List of allowed values for 'perpage' setting $validperpage.
 

Detailed Description

The screen with a list of users.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ allowcategories()

static gradereport_singleview\local\screen\grade::allowcategories ( )
static

True if $CFG->grade_overridecat is true.

Return values
bool

◆ bulk_insert()

gradereport_singleview\local\screen\tablelike::bulk_insert ( )
inherited

Get the HTML for the bulk insert form.

Return values
string

◆ buttons()

gradereport_singleview\local\screen\tablelike::buttons ( bool $disabled = false)
inherited

Get the buttons for saving changes.

Parameters
bool$disabledIf button is disabled
Return values
array

◆ definition()

gradereport_singleview\local\screen\tablelike::definition ( )
inherited

Get the table definition.

Return values
arrayThe definition.

◆ description()

gradereport_singleview\local\screen\grade::description ( )

Get the description of this page.

Return values
string

Implements gradereport_singleview\local\screen\selectable_items.

◆ display_group_selector()

gradereport_singleview\local\screen\screen::display_group_selector ( )
inherited

◆ fetch_grade_or_default()

gradereport_singleview\local\screen\screen::fetch_grade_or_default ( grade_item $item,
int $userid )
inherited

Get the grade_grade.

Parameters
grade_item$itemThe grade_item
int$useridThe user id
Return values
grade_grade

◆ filter()

static gradereport_singleview\local\screen\grade::filter ( $item)
static

Filter the list excluding category items (if required)?

Parameters
grade_item$itemThe grade item.
Return values
bool

Implements gradereport_singleview\local\screen\filterable_items.

◆ format_definition()

gradereport_singleview\local\screen\tablelike::format_definition ( grade_grade $grade)
inherited

Get a element to generate the HTML for this table row.

Parameters
grade_grade$gradeThe grade.
Return values
array

◆ format_line()

gradereport_singleview\local\screen\grade::format_line ( $item)

Format a row in the table.

Parameters
stdClass$item
Return values
array

Reimplemented from gradereport_singleview\local\screen\tablelike.

◆ format_link()

gradereport_singleview\local\screen\screen::format_link ( string $screen,
int $itemid,
bool $display = null )
inherited

Create a nice link from a thing (user or grade_item).

Parameters
string$screen
int$itemid
bool | null$displayShould we wrap this in an anchor ?
Return values
stringThe link

◆ headers()

gradereport_singleview\local\screen\tablelike::headers ( )
inherited

Get the table headers.

Return values
array

◆ heading()

gradereport_singleview\local\screen\grade::heading ( )

Get the heading for this page.

Return values
string

Reimplemented from gradereport_singleview\local\screen\screen.

◆ html()

gradereport_singleview\local\screen\tablelike::html ( )
inherited

Get the HTML for the whole table.

Return values
string

Reimplemented from gradereport_singleview\local\screen\screen.

◆ init() [1/2]

gradereport_singleview\local\screen\grade::init ( $selfitemisempty = false)

Init this page.

Parameters
bool$selfitemisemptyTrue if we have not selected a user.

◆ init() [2/2]

gradereport_singleview\local\screen\screen::init ( bool $selfitemisempty = false)
abstractinherited

Override this to init the screen.

Parameters
boolean$selfitemisemptyTrue if no item has been selected yet.

◆ init_errors()

gradereport_singleview\local\screen\tablelike::init_errors ( )
inherited

Get the list of errors.

Return values
array

◆ is_readonly()

gradereport_singleview\local\screen\tablelike::is_readonly ( )
inherited

Return true if this is read-only.

Return values
bool

Implements gradereport_singleview\local\ui\be_readonly.

◆ item_range()

gradereport_singleview\local\screen\grade::item_range ( )

Get the range ui element for this grade_item.

Return values
element;

◆ item_type()

gradereport_singleview\local\screen\grade::item_type ( )

Return the type of the things in this list.

Return values
string

Reimplemented from gradereport_singleview\local\screen\screen.

◆ load_users()

gradereport_singleview\local\screen\screen::load_users ( )
protectedinherited

Load a valid list of users for this gradebook as the screen "items".

Deprecated
since Moodle 4.3
Return values
arrayA list of enroled users.

◆ options()

gradereport_singleview\local\screen\grade::options ( )

Convert this list of items into an options list.

Return values
array

Reimplemented from gradereport_singleview\local\screen\screen.

◆ original_definition()

gradereport_singleview\local\screen\grade::original_definition ( )

Get the original settings for this item.

Return values
array

◆ original_headers()

gradereport_singleview\local\screen\grade::original_headers ( )

Get the table headers.

Return values
array

◆ pager()

gradereport_singleview\local\screen\grade::pager ( )

Get the pager for this page.

Return values
string

Reimplemented from gradereport_singleview\local\screen\screen.

◆ perpage_select()

gradereport_singleview\local\screen\screen::perpage_select ( )
inherited

Allow selection of number of items to display per page.

Return values
string

◆ process()

gradereport_singleview\local\screen\grade::process ( $data)

Process the data from the form.

Parameters
array$data
Return values
stdClassof warnings

Reimplemented from gradereport_singleview\local\screen\screen.

◆ select_label()

gradereport_singleview\local\screen\grade::select_label ( )

Get the label for the select box that chooses items for this page.

Return values
string

Implements gradereport_singleview\local\screen\selectable_items.

◆ set_definition()

gradereport_singleview\local\screen\tablelike::set_definition ( array $overwrite)
inherited

Set the table definition.

Parameters
array$overwriteNew definition
Return values
tablelikeThis

◆ set_headers()

gradereport_singleview\local\screen\tablelike::set_headers ( array $overwrite)
inherited

Set the table headers.

Parameters
array$overwriteNew headers
Return values
tablelikeThis

◆ set_init_error()

gradereport_singleview\local\screen\tablelike::set_init_error ( string $mesg)
inherited

Set an error detected while building the page.

Parameters
string$mesg

◆ summary()

gradereport_singleview\local\screen\grade::summary ( )

Get the summary for this table.

Return values
string

Reimplemented from gradereport_singleview\local\screen\tablelike.

◆ supports_next_prev()

gradereport_singleview\local\screen\screen::supports_next_prev ( )
inherited

Should we show the next prev selector?

Return values
bool

Reimplemented in gradereport_singleview\local\screen\select.

◆ supports_paging()

gradereport_singleview\local\screen\grade::supports_paging ( )

Does this page require paging?

Return values
bool

Reimplemented from gradereport_singleview\local\screen\screen.


The documentation for this class was generated from the following file: