Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Public Member Functions | Public Attributes | List of all members
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. More...
 
 add_mform_elements (&$mform)
 Add hidden elements into mform. More...
 
 add_url_params (moodle_url $url)
 Add return tracking params into url. More...
 
 get_form_fields ()
 Returns string with hidden return tracking form elements. More...
 
 get_options ()
 Returns return parameters as options array suitable for buttons. More...
 
 get_return_url ($default, $extras=null)
 Returns return url. More...
 
 grade_plugin_return ($params=null)
 Old syntax of class constructor. More...
 

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. More...
 
string $type
 Type of grade plugin (e.g. More...
 
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
string::$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: