|
| create_content ($instance, $record=array()) |
| Generates a piece of content for the module. More...
|
|
| create_instance ($record=null, array $options=null) |
| Creates an instance of the module for testing purposes. More...
|
|
| create_item_info ($feedback, $record=array()) |
| Create info question item. More...
|
|
| create_item_label ($feedback, $record=array()) |
| Create label question item. More...
|
|
| create_item_multichoice ($feedback, $record=array()) |
| Create multichoice question item. More...
|
|
| create_item_multichoicerated ($feedback, $record=array()) |
| Create multichoicerated question item. More...
|
|
| create_item_numeric ($feedback, $record=array()) |
| Create numeric question item. More...
|
|
| create_item_pagebreak ($feedback) |
| Create pagebreak. More...
|
|
| create_item_textarea ($feedback, $record=array()) |
| Create textarea question item. More...
|
|
| create_item_textfield ($feedback, $record=array()) |
| Create textfield question item. More...
|
|
| get_modulename () |
| Returns module name. More...
|
|
| reset () |
| To be called from data reset code only, do not use in tests. More...
|
|
◆ create_content()
testing_module_generator::create_content |
( |
|
$instance, |
|
|
|
$record = array() |
|
) |
| |
|
inherited |
◆ create_instance()
mod_feedback_generator::create_instance |
( |
|
$record = null , |
|
|
array |
$options = null |
|
) |
| |
Creates an instance of the module for testing purposes.
Module type will be taken from the class name. Each module type may overwrite this function to add other default values used by it.
- Parameters
-
array | stdClass | $record | data for module being generated. Requires 'course' key (an id or the full object). Also can have any fields from add module form. |
null | array | $options | general options for course module. Since 2.6 it is possible to omit this argument by merging options into $record |
- Return values
-
stdClass | record from module-defined table with additional field cmid (corresponding id in course_modules table) |
Reimplemented from testing_module_generator.
◆ create_item_info()
mod_feedback_generator::create_item_info |
( |
|
$feedback, |
|
|
|
$record = array() |
|
) |
| |
Create info question item.
- Parameters
-
object | $feedback | feedback record |
array | $record | (optional) to override default values |
- Return values
-
◆ create_item_label()
mod_feedback_generator::create_item_label |
( |
|
$feedback, |
|
|
|
$record = array() |
|
) |
| |
Create label question item.
- Parameters
-
object | $feedback | feedback record |
array | $record | (optional) to override default values |
- Return values
-
◆ create_item_multichoice()
mod_feedback_generator::create_item_multichoice |
( |
|
$feedback, |
|
|
|
$record = array() |
|
) |
| |
Create multichoice question item.
- Parameters
-
object | $feedback | feedback record |
array | $record | (optional) to override default values |
- Return values
-
◆ create_item_multichoicerated()
mod_feedback_generator::create_item_multichoicerated |
( |
|
$feedback, |
|
|
|
$record = array() |
|
) |
| |
Create multichoicerated question item.
- Parameters
-
object | $feedback | feedback record |
array | $record | (optional) to override default values |
- Return values
-
◆ create_item_numeric()
mod_feedback_generator::create_item_numeric |
( |
|
$feedback, |
|
|
|
$record = array() |
|
) |
| |
Create numeric question item.
- Parameters
-
object | $feedback | feedback record |
array | $record | (optional) to override default values |
- Return values
-
◆ create_item_pagebreak()
mod_feedback_generator::create_item_pagebreak |
( |
|
$feedback | ) |
|
Create pagebreak.
- Parameters
-
object | $feedback | feedback record |
- Return values
-
mixed | false if there already is a pagebreak on last position or the id of the pagebreak-item |
◆ create_item_textarea()
mod_feedback_generator::create_item_textarea |
( |
|
$feedback, |
|
|
|
$record = array() |
|
) |
| |
Create textarea question item.
- Parameters
-
object | $feedback | feedback record |
array | $record | (optional) to override default values |
- Return values
-
◆ create_item_textfield()
mod_feedback_generator::create_item_textfield |
( |
|
$feedback, |
|
|
|
$record = array() |
|
) |
| |
Create textfield question item.
- Parameters
-
object | $feedback | feedback record |
array | $record | (optional) to override default values |
- Return values
-
◆ get_modulename()
testing_module_generator::get_modulename |
( |
| ) |
|
|
inherited |
Returns module name.
- Return values
-
string | name of module that this class describes |
- Exceptions
-
◆ post_add_instance()
testing_module_generator::post_add_instance |
( |
|
$id, |
|
|
|
$cmid |
|
) |
| |
|
protectedinherited |
◆ precreate_course_module()
testing_module_generator::precreate_course_module |
( |
|
$courseid, |
|
|
array |
$options |
|
) |
| |
|
protectedinherited |
◆ prepare_moduleinfo_record()
testing_module_generator::prepare_moduleinfo_record |
( |
|
$record, |
|
|
|
$options |
|
) |
| |
|
protectedinherited |
Merges together arguments $record and $options and fills default module fields that are shared by all module types.
- Parameters
-
object | array | $record | fields (different from defaults) for this module |
null | array | $options | for backward-compatibility this may include fields from course_modules table. They are merged into $record |
- Exceptions
-
◆ reset()
testing_module_generator::reset |
( |
| ) |
|
|
inherited |
The documentation for this class was generated from the following file:
- mod/feedback/tests/generator/lib.php