Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
gradereport_singleview\local\screen\screen Class Reference

Abstract class used as a base for the 3 screens. More...

Inheritance diagram for gradereport_singleview\local\screen\screen:
gradereport_singleview\local\screen\select gradereport_singleview\local\screen\tablelike gradereport_singleview\local\screen\grade gradereport_singleview\local\screen\user

Public Member Functions

 __construct ($courseid, $itemid, $groupid=null)
 Constructor. More...
 
 display_group_selector ()
 Should we show the group selector? More...
 
 fetch_grade_or_default ($item, $userid)
 Get the grade_grade. More...
 
 format_link ($screen, $itemid, $display=null)
 Create a nice link from a thing (user or grade_item). More...
 
 heading ()
 Get the default heading for the screen. More...
 
 html ()
 Get the entire screen as a string. More...
 
 init ($selfitemisempty=false)
 Override this to init the screen. More...
 
 item_type ()
 Get the type of items in the list. More...
 
 js ()
 Initialise the js for this screen.
 
 make_toggle ($key)
 Make the HTML element that toggles all the checkboxes on or off. More...
 
 make_toggle_links ($key)
 Make a toggle link with some text before it. More...
 
 options ()
 By default there are no options. More...
 
 pager ()
 Default pager. More...
 
 perpage_select ()
 Allow selection of number of items to display per page. More...
 
 process ($data)
 Process the data from a form submission. More...
 
 setup_structure ()
 Cache the grade_structure class.
 
 supports_next_prev ()
 Should we show the next prev selector? More...
 
 supports_paging ()
 Does this screen support paging? More...
 

Protected Member Functions

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

Protected Attributes

course_context $context
 $context The course context
 
int $courseid
 $courseid The id of the course
 
int $groupid
 $groupid The currently set groupid (if set)
 
int $itemid
 $itemid Either a user id or a grade_item id
 
array $items
 $items List of items on the page, they could be users or grade_items
 
int $page
 $page The page number
 
int $perpage
 $perpage Results per page
 

Static Protected Attributes

static array $validperpage = [20, 50, 100, 200, 400, 1000, 5000]
 $validperpage List of allowed values for 'perpage' setting
 

Detailed Description

Abstract class used as a base for the 3 screens.

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

Constructor & Destructor Documentation

◆ __construct()

gradereport_singleview\local\screen\screen::__construct (   $courseid,
  $itemid,
  $groupid = null 
)

Constructor.

Parameters
int$courseidThe course id
int$itemidThe item id
int$groupidThe group id

Member Function Documentation

◆ display_group_selector()

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

Should we show the group selector?

Return values
bool

◆ fetch_grade_or_default()

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

Get the grade_grade.

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

◆ format_link()

gradereport_singleview\local\screen\screen::format_link (   $screen,
  $itemid,
  $display = null 
)

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

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

◆ heading()

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

Get the default heading for the screen.

Return values
string

Reimplemented in gradereport_singleview\local\screen\user, and gradereport_singleview\local\screen\grade.

◆ html()

gradereport_singleview\local\screen\screen::html ( )
abstract

Get the entire screen as a string.

Return values
string

Reimplemented in gradereport_singleview\local\screen\tablelike, and gradereport_singleview\local\screen\select.

◆ init()

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

Override this to init the screen.

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

Reimplemented in gradereport_singleview\local\screen\user, gradereport_singleview\local\screen\select, and gradereport_singleview\local\screen\grade.

◆ item_type()

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

Get the type of items in the list.

Return values
string

Reimplemented in gradereport_singleview\local\screen\user, gradereport_singleview\local\screen\select, and gradereport_singleview\local\screen\grade.

◆ load_users()

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

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

Return values
array::$usersA list of enroled users.

◆ make_toggle()

gradereport_singleview\local\screen\screen::make_toggle (   $key)

Make the HTML element that toggles all the checkboxes on or off.

Parameters
string$keyA unique key for this control - inserted in the classes.
Return values
string

◆ make_toggle_links()

gradereport_singleview\local\screen\screen::make_toggle_links (   $key)

Make a toggle link with some text before it.

Parameters
string$keyA unique key for this control - inserted in the classes.
Return values
string

◆ options()

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

By default there are no options.

Return values
array

Reimplemented in gradereport_singleview\local\screen\user, and gradereport_singleview\local\screen\grade.

◆ pager()

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

Default pager.

Return values
string

Reimplemented in gradereport_singleview\local\screen\user, and gradereport_singleview\local\screen\grade.

◆ perpage_select()

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

Allow selection of number of items to display per page.

Return values
string

◆ process()

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

Process the data from a form submission.

Parameters
array$data
Return values
arrayof warnings

Reimplemented in gradereport_singleview\local\screen\user, and gradereport_singleview\local\screen\grade.

◆ supports_next_prev()

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

Should we show the next prev selector?

Return values
bool

Reimplemented in gradereport_singleview\local\screen\select.

◆ supports_paging()

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

Does this screen support paging?

Return values
bool

Reimplemented in gradereport_singleview\local\screen\user, and gradereport_singleview\local\screen\grade.


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