|
Moodle
2.2.1
http://www.collinsharper.com
|
Public Member Functions | |
| question_category_object ($page, $pageurl, $contexts, $currentcat, $defaultcategory, $todelete, $addcontexts) | |
| initialize ($page, $contexts, $currentcat, $defaultcategory, $todelete, $addcontexts) | |
| display_user_interface () | |
| output_new_table () | |
| output_edit_lists () | |
| get_course_ids ($categories) | |
| edit_single_category ($categoryid) | |
| set_viable_parents (&$parentstrings, $category) | |
| get_question_categories ($parent=null, $sort="sortorder ASC") | |
| delete_category ($categoryid) | |
| move_questions_and_delete_category ($oldcat, $newcat) | |
| display_move_form ($questionsincategory, $category) | |
| move_questions ($oldcat, $newcat) | |
| add_category ($newparent, $newcategory, $newinfo, $return=false) | |
| update_category ($updateid, $newparent, $newname, $newinfo) | |
Data Fields | |
| $str | |
| $editlists = array() | |
| $newtable | |
| $tab | |
| $tabsize = 3 | |
| $pageurl | |
| $catform | |
Class representing q question category
Definition at line 126 of file category_class.php.
| add_category | ( | $ | newparent, |
| $ | newcategory, | ||
| $ | newinfo, | ||
| $ | return = false |
||
| ) |
Creates a new category with given params
Definition at line 369 of file category_class.php.

| delete_category | ( | $ | categoryid | ) |
Deletes an existing question category
| int | deletecat id of category to delete |
Send the children categories to live with their grandparent
Finally delete the category itself
Definition at line 331 of file category_class.php.


| display_move_form | ( | $ | questionsincategory, |
| $ | category | ||
| ) |
Definition at line 350 of file category_class.php.
Displays the user interface
Interface for editing existing categories
Interface for adding a new category:
Definition at line 213 of file category_class.php.

| edit_single_category | ( | $ | categoryid | ) |
Interface for adding a new category
Interface for editing existing categories
Definition at line 273 of file category_class.php.

| get_course_ids | ( | $ | categories | ) |
gets all the courseids for the given categories
| array | categories contains category objects in a tree representation |
Definition at line 262 of file category_class.php.
| get_question_categories | ( | $ | parent = null, |
| $ | sort = "sortorder ASC" |
||
| ) |
Gets question categories
| int | parent - if given, restrict records to those with this parent id. |
| string | sort - [[sortfield [,sortfield]] {ASC|DESC}] |
Definition at line 315 of file category_class.php.
| initialize | ( | $ | page, |
| $ | contexts, | ||
| $ | currentcat, | ||
| $ | defaultcategory, | ||
| $ | todelete, | ||
| $ | addcontexts | ||
| ) |
Initializes this classes general category-related variables
Definition at line 187 of file category_class.php.

| move_questions | ( | $ | oldcat, |
| $ | newcat | ||
| ) |
Definition at line 359 of file category_class.php.


| move_questions_and_delete_category | ( | $ | oldcat, |
| $ | newcat | ||
| ) |
Outputs a list to allow editing/rearranging of existing categories
$this->initialize() must have already been called
Definition at line 239 of file category_class.php.


| output_new_table | ( | ) |
Outputs a table to allow entry of a new category
Definition at line 229 of file category_class.php.

| question_category_object | ( | $ | page, |
| $ | pageurl, | ||
| $ | contexts, | ||
| $ | currentcat, | ||
| $ | defaultcategory, | ||
| $ | todelete, | ||
| $ | addcontexts | ||
| ) |
Constructor
Gets necessary strings and sets relevant path information
Definition at line 153 of file category_class.php.

| set_viable_parents | ( | &$ | parentstrings, |
| $ | category | ||
| ) |
Sets the viable parents
Viable parents are any except for the category itself, or any of it's descendants The parentstrings parameter is passed by reference and changed by this function.
| array | parentstrings a list of parentstrings |
| object | category |
Definition at line 298 of file category_class.php.
| update_category | ( | $ | updateid, |
| $ | newparent, | ||
| $ | newname, | ||
| $ | newinfo | ||
| ) |
Updates an existing category with given params
Definition at line 402 of file category_class.php.

| $catform |
Definition at line 146 of file category_class.php.
| $editlists = array() |
Definition at line 134 of file category_class.php.
| $newtable |
Definition at line 135 of file category_class.php.
| $pageurl |
Definition at line 142 of file category_class.php.
| $str |
Definition at line 128 of file category_class.php.
| $tab |
Definition at line 136 of file category_class.php.
| $tabsize = 3 |
Definition at line 137 of file category_class.php.