Moodle  2.2.1
http://www.collinsharper.com
moodle1_question_bank_handler Class Reference
Inheritance diagram for moodle1_question_bank_handler:
Collaboration diagram for moodle1_question_bank_handler:

Public Member Functions

 get_paths ()
 on_question_categories_start ()
 on_question_category_start ()
 process_question_category ($data, $raw)
 process_question_category_context ($data)
 process_question (array $data, array $raw)
 on_questions_end ()
 on_question_category_end ()
 on_question_categories_end ()

Protected Member Functions

 get_qtype_handler ($qtype)

Protected Attributes

 $currentcategory = null
 $currentcategoryraw = null
 $fileman = null

Detailed Description

Handles the conversion of the question bank included in the moodle.xml file

Definition at line 1020 of file handlerlib.php.


Member Function Documentation

get_paths ( )

Registers path that are not qtype-specific

Definition at line 1043 of file handlerlib.php.

Here is the call graph for this function:

get_qtype_handler ( qtype) [protected]

Provides access to the qtype handlers

Returns either list of all qtype handler instances (if passed '*') or a particular handler for the given qtype or false if the qtype is not supported.

Exceptions:
moodle1_convert_exception
Parameters:
string$qtypethe name of the question type or '*' for returning all
Returns:
array|moodle1_qtype_handler|bool

Definition at line 1302 of file handlerlib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Stops writing questions.xml

Definition at line 1287 of file handlerlib.php.

Here is the call graph for this function:

Starts writing questions.xml and prepares the file manager instance

Definition at line 1079 of file handlerlib.php.

Here is the call graph for this function:

Closes the question_category and annotates the category id so that it can be dumped into course/inforef.xml

Definition at line 1272 of file handlerlib.php.

Here is the call graph for this function:

Initializes the current category cache

Definition at line 1090 of file handlerlib.php.

Closes the questions wrapper

Definition at line 1264 of file handlerlib.php.

process_question ( array data,
array raw 
)

Writes the common <question> data and re-dispateches the whole grouped <QUESTION> data to the qtype for appending its qtype specific data processing

Parameters:
array$data
array$raw
Returns:
array

Definition at line 1150 of file handlerlib.php.

Here is the call graph for this function:

process_question_category ( data,
raw 
)

Populates the current question category data

Bacuse of the known subpath-in-the-middle problem (CONTEXT in this case), this is actually called twice for both halves of the data. We merge them here into the currentcategory array.

Definition at line 1103 of file handlerlib.php.

Inject the context related information into the current category

Definition at line 1111 of file handlerlib.php.


Field Documentation

$currentcategory = null [protected]

Definition at line 1023 of file handlerlib.php.

$currentcategoryraw = null [protected]

Definition at line 1026 of file handlerlib.php.

$fileman = null [protected]

Definition at line 1029 of file handlerlib.php.


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