| [ Index ] |
PHP Cross Reference of Moodle 1.9.3 [Build 15-Oct-2008] |
[Source view] [Print] [Project Stats]
Functions used to show question editing interface
| Author: | Martin Dougiamas and many others. This has recently been extensively |
| License: | http://www.gnu.org/copyleft/gpl.html GNU Public License |
| File Size: | 899 lines (37 kb) |
| Included or required: | 3 times |
| Referenced: | 3 times |
| Includes or requires: | 0 files |
question_edit_contexts:: (13 methods):
question_edit_contexts()
all()
lowest()
having_cap()
having_one_cap()
having_one_edit_tab_cap()
have_cap()
have_one_cap()
have_one_edit_tab_cap()
require_cap()
require_one_cap()
require_one_edit_tab_cap()
require_login_in_context()
Class: question_edit_contexts - X-Ref
| question_edit_contexts($thiscontext) X-Ref |
param: current context |
| all() X-Ref |
return: array all parent contexts |
| lowest() X-Ref |
return: object lowest context which must be either the module or course context |
| having_cap($cap) X-Ref |
param: string $cap capability return: array parent contexts having capability, zero based index |
| having_one_cap($caps) X-Ref |
param: array $caps capabilities return: array parent contexts having at least one of $caps, zero based index |
| having_one_edit_tab_cap($tabname) X-Ref |
param: string $tabname edit tab name return: array parent contexts having at least one of $caps, zero based index |
| have_cap($cap) X-Ref |
| Has at least one parent context got the cap $cap? param: string $cap capability return: boolean |
| have_one_cap($caps) X-Ref |
| Has at least one parent context got one of the caps $caps? param: string $cap capability return: boolean |
| have_one_edit_tab_cap($tabname) X-Ref |
| Has at least one parent context got one of the caps for actions on $tabname param: string $tabname edit tab name return: boolean |
| require_cap($cap) X-Ref |
| Throw error if at least one parent context hasn't got the cap $cap param: string $cap capability |
| require_one_cap($caps) X-Ref |
| Throw error if at least one parent context hasn't got one of the caps $caps param: array $cap capabilities |
| require_one_edit_tab_cap($tabname) X-Ref |
| Throw error if at least one parent context hasn't got one of the caps $caps param: string $tabname edit tab name |
| require_login_in_context($contextorid = null) X-Ref |
| Make sure user is logged in as required in this context. |
| get_module_from_cmid($cmid) X-Ref |
| No description |
| get_questions_category( $category, $noparent=false, $recurse=true, $export=true ) X-Ref |
| Function to read all questions for category into big array author: added by Howard Miller June 2004 param: int $category category number param: bool $noparent if true only questions with NO parent will be selected param: bool $recurse include subdirectories param: bool $export set true if this is called by questionbank export |
| question_can_delete_cat($todelete) X-Ref |
| No description |
| question_category_form($contexts, $pageurl, $current, $recurse=1, $showhidden=false, $showquestiontext=false) X-Ref |
| prints a form to choose categories |
| question_category_form_checkbox($name, $checked) X-Ref |
| Private funciton to help the preceeding function. |
| question_list($contexts, $pageurl, $categoryandcontext, $cm = null,$recurse=1, $page=0, $perpage=100, $showhidden=false, $sortorder='typename', $sortorderdecoded='qtype, name ASC',$showquestiontext = false, $addcontexts = array() X-Ref |
| Prints the table of questions in a category with interactions param: object $course The course object param: int $categoryid The id of the question category to be displayed param: int $cm The course module record if we are in the context of a particular module, 0 otherwise param: int $recurse This is 1 if subcategories should be included, 0 otherwise param: int $page The number of the page to be displayed param: int $perpage Number of questions to show per page param: boolean $showhidden True if also hidden questions should be displayed param: boolean $showquestiontext whether the text of each question should be shown in the list |
| question_sort_options($pageurl, $sortorder) X-Ref |
| No description |
| question_showbank_actions($pageurl, $cm) X-Ref |
| No description |
| question_showbank($tabname, $contexts, $pageurl, $cm, $page, $perpage, $sortorder, $sortorderdecoded, $cat, $recurse, $showhidden, $showquestiontext) X-Ref |
| Shows the question bank editing interface. The function also processes a number of actions: Actions affecting the question pool: move Moves a question to a different category deleteselected Deletes the selected questions from the category Other actions: category Chooses the category displayoptions Sets display options author: Martin Dougiamas and many others. This has recently been extensively param: moodle_url $pageurl object representing this pages url. |
| question_edit_setup($edittab, $requirecmid = false, $requirecourseid = true) X-Ref |
| Common setup for all pages for editing questions. param: string $edittab code for this edit tab param: boolean $requirecmid require cmid? default false param: boolean $requirecourseid require courseid, if cmid is not given? default true return: array $thispageurl, $contexts, $cmid, $cm, $module, $pagevars |
| Generated: Wed Jan 14 11:33:29 2009 | Cross-referenced by PHPXref 0.7 |