Moodle  2.2.1
http://www.collinsharper.com
question_category_object Class Reference

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

Detailed Description

Class representing q question category

Definition at line 126 of file category_class.php.


Member Function Documentation

add_category ( newparent,
newcategory,
newinfo,
return = false 
)

Creates a new category with given params

Definition at line 369 of file category_class.php.

Here is the call graph for this function:

delete_category ( categoryid)

Deletes an existing question category

Parameters:
intdeletecat 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.

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Here is the call graph for this function:

edit_single_category ( categoryid)

Interface for adding a new category

Interface for editing existing categories

Definition at line 273 of file category_class.php.

Here is the call graph for this function:

get_course_ids ( categories)

gets all the courseids for the given categories

Parameters:
arraycategories contains category objects in a tree representation
Returns:
array courseids flat array in form categoryid=>courseid

Definition at line 262 of file category_class.php.

get_question_categories ( parent = null,
sort = "sortorder ASC" 
)

Gets question categories

Parameters:
intparent - if given, restrict records to those with this parent id.
stringsort - [[sortfield [,sortfield]] {ASC|DESC}]
Returns:
array categories

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.

Here is the caller graph for this function:

move_questions ( oldcat,
newcat 
)

Definition at line 359 of file category_class.php.

Here is the call graph for this function:

Here is the caller graph for this function:

move_questions_and_delete_category ( oldcat,
newcat 
)

Definition at line 344 of file category_class.php.

Here is the call graph for this function:

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.

Here is the call graph for this function:

Here is the caller graph for this function:

Outputs a table to allow entry of a new category

Definition at line 229 of file category_class.php.

Here is the caller graph for this function:

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.

Here is the call graph for this function:

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.

Parameters:
arrayparentstrings a list of parentstrings
objectcategory

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.

Here is the call graph for this function:


Field Documentation

$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.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations