mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
MDL-40241 core_completion: Minor fixes to provided patch
Thanks to Aaron Barnes and Jon Sharp for working on this issue.
This commit is contained in:
parent
525d6ce397
commit
95d1a366ea
5 changed files with 51 additions and 59 deletions
|
@ -106,18 +106,18 @@ class behat_completion extends behat_base {
|
|||
}
|
||||
|
||||
/**
|
||||
* Toggles completion tracking for course
|
||||
* Toggles completion tracking for course being in the course page.
|
||||
*
|
||||
* @When /^completion tracking is "(?P<completion_status_string>([Ee]nabled|[Dd]isabled)*)" in current course$/
|
||||
* @param string $completionstatus
|
||||
* @When /^completion tracking is "(?P<completion_status_string>Enabled|Disabled)" in current course$/
|
||||
* @param string $completionstatus The status, enabled or disabled.
|
||||
*/
|
||||
public function completion_is_toggled_in_course($completionstatus) {
|
||||
|
||||
$toggle = strtolower($completionstatus) == 'enabled' ? 'Yes' : 'No';
|
||||
$toggle = strtolower($completionstatus) == 'enabled' ? get_string('yes') : get_string('no');
|
||||
|
||||
return array(
|
||||
new Given('I follow "'.get_string('editsettings').'"'),
|
||||
new Given('I select "'.$toggle.'" from "'.get_string('enablecompletion', 'completion').'"'),
|
||||
new Given('I set the field "'.get_string('enablecompletion', 'completion').'" to "'.$toggle.'"'),
|
||||
new Given('I press "'.get_string('savechanges').'"')
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue