Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 310 and 401] [Versions 310 and 402] [Versions 310 and 403] [Versions 39 and 310]

Abstract class used as a base for the 3 screens.

Copyright: 2014 Moodle Pty Ltd (http://moodle.com)
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 460 lines (14 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

screen:: (16 methods):
  __construct()
  setup_structure()
  format_link()
  fetch_grade_or_default()
  make_toggle()
  make_toggle_links()
  heading()
  supports_paging()
  pager()
  js()
  process()
  options()
  display_group_selector()
  supports_next_prev()
  load_users()
  perpage_select()


Class: screen  - X-Ref

Abstract class used as a base for the 3 screens.

__construct($courseid, $itemid, $groupid = null)   X-Ref
Constructor

param: int $courseid The course id
param: int $itemid The item id
param: int $groupid The group id

setup_structure()   X-Ref
Cache the grade_structure class


format_link($screen, $itemid, $display = null)   X-Ref
Create a nice link from a thing (user or grade_item).

param: string $screen
param: int $itemid
param: bool $display Should we wrap this in an anchor ?
return: string The link

fetch_grade_or_default($item, $userid)   X-Ref
Get the grade_grade

param: grade_item $item The grade_item
param: int $userid The user id
return: grade_grade

make_toggle($key)   X-Ref
Make the HTML element that toggles all the checkboxes on or off.

param: string $key A unique key for this control - inserted in the classes.
return: string

make_toggle_links($key)   X-Ref
Make a toggle link with some text before it.

param: string $key A unique key for this control - inserted in the classes.
return: string

heading()   X-Ref
Get the default heading for the screen.

return: string

supports_paging()   X-Ref
Does this screen support paging?

return: bool

pager()   X-Ref
Default pager

return: string

js()   X-Ref
Initialise the js for this screen.


process($data)   X-Ref
Process the data from a form submission.

param: array $data
return: array of warnings

options()   X-Ref
By default there are no options.

return: array

display_group_selector()   X-Ref
Should we show the group selector?

return: bool

supports_next_prev()   X-Ref
Should we show the next prev selector?

return: bool

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

return: array $users A list of enroled users.

perpage_select()   X-Ref
Allow selection of number of items to display per page.

return: string