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

Public Member Functions

 assemble_category_path ($names)
 split_category_path ($names)

Detailed Description

Subclass to make it easier to test qformat_default.

Definition at line 39 of file testimportexport.php.


Member Function Documentation

assemble_category_path ( names)

Convert a list of category names, possibly preceeded by one of the context tokens like $course$, into a string representation of the category path.

Names are separated by / delimiters. And /s in the name are replaced by //.

To reverse the process and split the paths into names, use split_category_path().

Parameters:
array$names
Returns:
string

Reimplemented from qformat_default.

Definition at line 40 of file testimportexport.php.

split_category_path ( path)

Convert a string, as returned by assemble_category_path(), back into an array of category names.

Each category name is cleaned by a call to clean_param(, PARAM_MULTILANG), which matches the cleaning in question/category_form.php.

Parameters:
string$path
Returns:
array of category names.

Reimplemented from qformat_default.

Definition at line 44 of file testimportexport.php.


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