mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
MDL-43770 core_behat: Pass additional params to enrol_user generator
Include timestart, timeend and status.
This commit is contained in:
parent
799770cbd7
commit
2f29dd628f
@ -352,6 +352,18 @@ class behat_data_generators extends behat_base {
|
||||
$data['enrol'] = 'manual';
|
||||
}
|
||||
|
||||
if (!isset($data['timestart'])) {
|
||||
$data['timestart'] = 0;
|
||||
}
|
||||
|
||||
if (!isset($data['timeend'])) {
|
||||
$data['timeend'] = 0;
|
||||
}
|
||||
|
||||
if (!isset($data['status'])) {
|
||||
$data['status'] = null;
|
||||
}
|
||||
|
||||
// If the provided course shortname is the site shortname we consider it a system role assign.
|
||||
if ($data['courseid'] == $SITE->id) {
|
||||
// Frontpage course assign.
|
||||
@ -360,7 +372,8 @@ class behat_data_generators extends behat_base {
|
||||
|
||||
} else {
|
||||
// Course assign.
|
||||
$this->datagenerator->enrol_user($data['userid'], $data['courseid'], $data['roleid'], $data['enrol']);
|
||||
$this->datagenerator->enrol_user($data['userid'], $data['courseid'], $data['roleid'], $data['enrol'],
|
||||
$data['timestart'], $data['timeend'], $data['status']);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user