Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
grade_plugin_return Class Reference

Utility class used for return tracking when using edit and other forms in grade plugins. More...

Public Member Functions

 __construct ($params=[])
 Constructor.
 
 add_mform_elements (&$mform)
 Add hidden elements into mform.
 
 add_url_params (moodle_url $url)
 Add return tracking params into url.
 
 get_form_fields ()
 Returns string with hidden return tracking form elements.
 
 get_options ()
 Returns return parameters as options array suitable for buttons.
 
 get_return_url ($default, $extras=null)
 Returns return url.
 
 grade_plugin_return ($params=null)
 Old syntax of class constructor.
 

Public Attributes

int $courseid
 Course id being viewed.
 
int $groupid
 Id of group for which information is being viewed/edited.
 
int $page
 Current page # within output.
 
string $plugin
 Name of grade plugin (e.g.
 
string $search
 Search string.
 
string $type
 Type of grade plugin (e.g.
 
int $userid
 Id of user whose information is being viewed/edited.
 

Detailed Description

Utility class used for return tracking when using edit and other forms in grade plugins.

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

Constructor & Destructor Documentation

◆ __construct()

grade_plugin_return::__construct ( $params = [])

Constructor.

Parameters
array$params- associative array with return parameters, if not supplied parameter are taken from _GET or _POST

Member Function Documentation

◆ add_mform_elements()

grade_plugin_return::add_mform_elements ( & $mform)

Add hidden elements into mform.

Parameters
object&$mformmoodle form object
Return values
void

◆ add_url_params()

grade_plugin_return::add_url_params ( moodle_url $url)

Add return tracking params into url.

Parameters
moodle_url$urlA URL
Return values
moodle_urlwith return tracking params

◆ get_form_fields()

grade_plugin_return::get_form_fields ( )

Returns string with hidden return tracking form elements.

Return values
string

◆ get_options()

grade_plugin_return::get_options ( )

Returns return parameters as options array suitable for buttons.

Return values
arrayoptions

◆ get_return_url()

grade_plugin_return::get_return_url ( $default,
$extras = null )

Returns return url.

Parameters
string$defaultdefault url when params not set
array$extrasExtra URL parameters
Return values
stringurl

◆ grade_plugin_return()

grade_plugin_return::grade_plugin_return ( $params = null)

Old syntax of class constructor.

Deprecated in PHP7.

Deprecated
since Moodle 3.1

Member Data Documentation

◆ $plugin

string grade_plugin_return::$plugin

Name of grade plugin (e.g.

'grader', 'overview')

◆ $type

string grade_plugin_return::$type

Type of grade plugin (e.g.

'edit', 'report')


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