|
| | create_content ($instance, $record=array()) |
| | Generates a piece of content for the module.
|
| |
| | create_instance ($record=null, array $options=null) |
| | Create a new instance of the assignment activity.
|
| |
| | create_override (array $data) |
| | Create an assign override (either user or group).
|
| |
| | create_submission (array $data) |
| | Create an assignment submission.
|
| |
| | get_modulename () |
| | Returns module name.
|
| |
| | reset () |
| | To be called from data reset code only, do not use in tests.
|
| |
|
| | get_grouping_id (string $idnumber) |
| | Gets the grouping id from it's idnumber.
|
| |
| | post_add_instance ($id, $cmid) |
| | Called after *_add_instance()
|
| |
| | precreate_course_module ($courseid, array $options) |
| | Create course module and link it to course.
|
| |
| | prepare_moduleinfo_record ($record, $options) |
| | Merges together arguments $record and $options and fills default module fields that are shared by all module types.
|
| |
| | set_user (?stdClass $user=null) |
| | Set the current user during data generation.
|
| |
|
|
testing_data_generator | $datagenerator |
| |
|
number | $instancecount = 0 |
| | of created instances
|
| |
◆ create_content()
| testing_module_generator::create_content |
( |
|
$instance, |
|
|
|
$record = array() |
|
) |
| |
|
inherited |
◆ create_instance()
| mod_assign_generator::create_instance |
( |
|
$record = null, |
|
|
array |
$options = null |
|
) |
| |
Create a new instance of the assignment activity.
- Parameters
-
| array | stdClass | null | $record | |
| array | null | $options | |
- Return values
-
Reimplemented from testing_module_generator.
◆ create_override()
| mod_assign_generator::create_override |
( |
array |
$data | ) |
|
Create an assign override (either user or group).
- Parameters
-
| array | $data | must specify assignid, and one of userid or groupid. |
- Exceptions
-
◆ create_submission()
| mod_assign_generator::create_submission |
( |
array |
$data | ) |
|
Create an assignment submission.
- Parameters
-
◆ get_grouping_id()
| mod_assign_generator::get_grouping_id |
( |
string |
$idnumber | ) |
|
|
protected |
Gets the grouping id from it's idnumber.
- Exceptions
-
- Parameters
-
- 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 |
◆ set_user()
| component_generator_base::set_user |
( |
?stdClass |
$user = null | ) |
|
|
protectedinherited |
Set the current user during data generation.
This should be avoided wherever possible, but in some situations underlying code will insert data as the current user.
- Parameters
-
The documentation for this class was generated from the following file: