Moodle APIs 4.3
Moodle 4.3.6 (Build: 20240812)
editlib.php File Reference

Functions

 create_new_question_button ($categoryid, $params, $caption, $tooltip='', $disabled=false)
 Print a button for creating a new question.
 
 get_module_from_cmid ($cmid)
 
 get_questions_category (object $category, bool $noparent, bool $recurse=true, bool $export=true, bool $latestversion=false)
 Function to read all questions for category into big array.
 
 print_choose_qtype_to_add_form ($hiddenparams, array $allowedqtypes=null, $enablejs=true)
 Print a form to let the user choose which question type to add.
 
 question_build_edit_resources ($edittab, $baseurl, $params, $defaultquestionsperpage=DEFAULT_QUESTIONS_PER_PAGE)
 Common function for building the generic resources required by the editing questions pages.
 
 question_can_delete_cat ($todelete)
 Ensures that this user is allowed to delete this category.
 
 question_edit_setup ($edittab, $baseurl, $requirecmid=false, $unused=null)
 Common setup for all pages for editing questions.
 
 question_get_category_id_from_pagevars (array $pagevars)
 Get the category id from $pagevars.
 
 question_get_display_preference ($param, $default, $type, $thispageurl)
 Get a particular question preference that is also stored as a user preference.
 
 question_is_only_child_of_top_category_in_context ($categoryid)
 Checks whether this is the only child of a top category in a context.
 
 question_is_top_category ($categoryid)
 Checks whether the category is a "Top" category (with no parent).
 
 question_set_or_get_user_preference ($name, $value, $default, $thispageurl)
 Get a user preference by name or set the user preference to a given value.
 
 require_login_in_context ($contextorid=null)
 Make sure user is logged in as required in this context.
 

Variables

const DEFAULT_QUESTIONS_PER_PAGE 100
 
const MAXIMUM_QUESTIONS_PER_PAGE 4000