[ Index ]

PHP Cross Reference of Moodle 1.9.3 [Build 15-Oct-2008]

title

Body

[close]

/question/ -> category_class.php (summary)

Class representing question categories

Author: Martin Dougiamas and many others. {@link http://moodle.org}
License: http://www.gnu.org/copyleft/gpl.html GNU Public License
File Size: 475 lines (19 kb)
Included or required:0 times
Referenced: 1 time
Includes or requires: 1 file
 question/move_form.php

Defines 3 classes

question_category_list:: (3 methods):
  question_category_list()
  get_records()
  process_actions()

question_category_list_item:: (2 methods):
  set_icon_html()
  item_html()

question_category_object:: (16 methods):
  question_category_object()
  initialize()
  display_user_interface()
  output_new_table()
  output_edit_lists()
  get_course_ids()
  edit_single_category()
  set_viable_parents()
  get_question_categories()
  delete_category()
  move_questions_and_delete_category()
  display_move_form()
  move_questions()
  add_category()
  update_category()
  move_question_from_cat_confirm()


Class: question_category_list  - X-Ref

Class: question_category_list_item  - X-Ref

set_icon_html($first, $last, &$lastitem)   X-Ref
No description

item_html($extraargs = array()   X-Ref
No description

Class: question_category_object  - X-Ref

Class representing question categories

question_category_object($page, $pageurl, $contexts, $currentcat, $defaultcategory, $todelete, $addcontexts)   X-Ref
Constructor

Gets necessary strings and sets relevant path information

initialize($page, $contexts, $currentcat, $defaultcategory, $todelete, $addcontexts)   X-Ref
Initializes this classes general category-related variables


display_user_interface()   X-Ref
Displays the user interface


output_new_table()   X-Ref
Outputs a table to allow entry of a new category


output_edit_lists()   X-Ref
Outputs a list to allow editing/rearranging of existing categories

$this->initialize() must have already been called


get_course_ids($categories)   X-Ref
gets all the courseids for the given categories

param: array categories contains category objects in  a tree representation
return: array courseids flat array in form categoryid=>courseid

edit_single_category($categoryid)   X-Ref
No description

set_viable_parents(&$parentstrings, $category)   X-Ref
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.

param: array parentstrings a list of parentstrings
param: object category

get_question_categories($parent=null, $sort="sortorder ASC")   X-Ref
Gets question categories

param: int parent - if given, restrict records to those with this parent id.
param: string sort - [[sortfield [,sortfield]] {ASC|DESC}]
return: array categories

delete_category($categoryid)   X-Ref
Deletes an existing question category

param: int deletecat  id of category to delete

move_questions_and_delete_category($oldcat, $newcat)   X-Ref
No description

display_move_form($questionsincategory, $category)   X-Ref
No description

move_questions($oldcat, $newcat)   X-Ref
No description

add_category($newparent, $newcategory, $newinfo)   X-Ref
Creates a new category with given params


update_category($updateid, $newparent, $newname, $newinfo)   X-Ref
Updates an existing category with given params


move_question_from_cat_confirm($fromcat, $fromcourse, $tocat=null, $question=null)   X-Ref
No description



Generated: Wed Jan 14 11:33:29 2009 Cross-referenced by PHPXref 0.7