Detailed Description
Tracks all the contexts related to the one where we are currently editing questions, and provides helper methods to check permissions.
- Copyright:
- 2007 Jamie Pratt me@jamiep.org http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
Definition at line 1492 of file questionlib.php.
Constructor & Destructor Documentation
Constructor
- Parameters:
-
| context | the current context. |
Definition at line 1521 of file questionlib.php.
Member Function Documentation
Has at least one parent context got the cap $cap?
- Parameters:
-
- Returns:
- boolean
Definition at line 1584 of file questionlib.php.
Has at least one parent context got one of the caps $caps?
- Parameters:
-
- Returns:
- boolean
Definition at line 1594 of file questionlib.php.
Has at least one parent context got one of the caps for actions on $tabname
- Parameters:
-
| string | $tabname | edit tab name |
- Returns:
- boolean
Definition at line 1609 of file questionlib.php.
- Parameters:
-
- Returns:
- array parent contexts having capability, zero based index
Definition at line 1543 of file questionlib.php.
- Parameters:
-
- Returns:
- array parent contexts having at least one of $caps, zero based index
Definition at line 1557 of file questionlib.php.
- Parameters:
-
| string | $tabname | edit tab name |
- Returns:
- array parent contexts having at least one of $caps, zero based index
Definition at line 1574 of file questionlib.php.
- Returns:
- object lowest context which must be either the module or course context
Definition at line 1535 of file questionlib.php.
Throw error if at least one parent context hasn't got the cap $cap
- Parameters:
-
Definition at line 1618 of file questionlib.php.
Throw error if at least one parent context hasn't got one of the caps $caps
- Parameters:
-
Definition at line 1629 of file questionlib.php.
Throw error if at least one parent context hasn't got one of the caps $caps
- Parameters:
-
| string | $tabname | edit tab name |
Definition at line 1641 of file questionlib.php.
Field Documentation
Initial value: array(
'editq' => array('moodle/question:add',
'moodle/question:editmine',
'moodle/question:editall',
'moodle/question:viewmine',
'moodle/question:viewall',
'moodle/question:usemine',
'moodle/question:useall',
'moodle/question:movemine',
'moodle/question:moveall'),
'questions'=>array('moodle/question:add',
'moodle/question:editmine',
'moodle/question:editall',
'moodle/question:viewmine',
'moodle/question:viewall',
'moodle/question:movemine',
'moodle/question:moveall'),
'categories'=>array('moodle/question:managecategory'),
'import'=>array('moodle/question:add'),
'export'=>array('moodle/question:viewall', 'moodle/question:viewmine'))
Definition at line 1494 of file questionlib.php.
The documentation for this class was generated from the following file: