[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/question/classes/bank/search/ -> category_condition.php (summary)

A search class to control from which category questions are listed.

Copyright: 2013 Ray Morris
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 183 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

category_condition:: (9 methods):
  __construct()
  init()
  where()
  params()
  display_options()
  display_options_adv()
  display_category_form()
  get_current_category()
  print_category_info()


Class: category_condition  - X-Ref

This class controls from which category questions are listed.

__construct($cat = null, $recurse = false, $contexts, $baseurl, $course, $maxinfolength = null)   X-Ref
Constructor

param: string     $cat           categoryID,contextID as used with question_bank_view->display()
param: bool       $recurse       Whether to include questions from sub-categories
param: array      $contexts      Context objects as used by question_category_options()
param: \moodle_url $baseurl       The URL the form is submitted to
param: \stdClass   $course        Course record
param: integer    $maxinfolength The maximum displayed length of the category info.

init()   X-Ref
Initialize the object so it will be ready to return where() and params()


where()   X-Ref
No description

params()   X-Ref
No description

display_options()   X-Ref
Called by question_bank_view to display the GUI for selecting a category


display_options_adv()   X-Ref
Displays the recursion checkbox GUI.
question_bank_view places this within the section that is hidden by default


display_category_form($contexts, $pageurl, $current)   X-Ref
Display the drop down to select the category.

param: array $contexts of contexts that can be accessed from here.
param: \moodle_url $pageurl the URL of this page.
param: string $current 'categoryID,contextID'.

get_current_category($categoryandcontext)   X-Ref
Look up the category record based on cateogry ID and context

param: string $categoryandcontext categoryID,contextID as used with question_bank_view->display()
return: \stdClass The category record

print_category_info($category)   X-Ref
Print the category description

param: stdClass $category the category information form the database.



Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1