|
Moodle
2.2.1
http://www.collinsharper.com
|
Public Member Functions | |
| __construct ($properties) | |
| __get ($key) | |
| __isset ($key) | |
| get_requester () | |
| check_shortname_collision ($shortnamemark= '[*]') | |
| approve () | |
| reject ($notice) | |
| delete () | |
Static Public Member Functions | |
| static | prepare ($data=null) |
| static | create ($data) |
| static | summary_editor_options () |
Protected Member Functions | |
| notify ($touser, $fromuser, $name='courserequested', $subject, $message) | |
Protected Attributes | |
| $properties | |
Static Protected Attributes | |
| static | $summaryeditoroptions |
| __construct | ( | $ | properties | ) |
Loads the properties for this course request object. Id is required and if only id is provided then we load the rest of the properties from the database
| stdClass | int | $properties | Either an object containing properties or the course_request id to load |
Definition at line 4107 of file lib.php.

| __get | ( | $ | key | ) |
| __isset | ( | $ | key | ) |
| approve | ( | ) |
This function approves the request turning it into a course
This function converts the course request into a course, at the same time transferring any files used in the summary to the new course and then removing the course request and the files associated with it.
Definition at line 4205 of file lib.php.

| check_shortname_collision | ( | $ | shortnamemark = '[*]' | ) |
Checks that the shortname used by the course does not conflict with any other courses that exist
| string | null | $shortnamemark | The string to append to the requests shortname should a conflict be found |
Definition at line 4175 of file lib.php.

| static create | ( | $ | data | ) | [static] |
Static function to create a new course request when passed an array of properties for it.
This function also handles saving any files that may have been used in the editor
| stdClass | $data |
Definition at line 4057 of file lib.php.

| delete | ( | ) |
| get_requester | ( | ) |
| notify | ( | $ | touser, |
| $ | fromuser, | ||
| $ | name = 'courserequested', |
||
| $ | subject, | ||
| $ | message | ||
| ) | [protected] |
| static prepare | ( | $ | data = null | ) | [static] |
Static function to prepare the summary editor for working with a course request.
| null | stdClass | $data | Optional, an object containing the default values for the form, these may be modified when preparing the editor so this should be called before creating the form |
Definition at line 4039 of file lib.php.

| reject | ( | $ | notice | ) |
Reject a course request
This function rejects a course request, emailing the requesting user the provided notice and then removing the request from the database
| string | $notice | The message to display to the user |
Definition at line 4276 of file lib.php.

| static summary_editor_options | ( | ) | [static] |
Returns an array of options to use with a summary editor
course_request::$summaryeditoroptions
Definition at line 4092 of file lib.php.
