Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion main/course_info/infocours.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ function is_settings_editable()
$group2[] = $form->createElement('radio', 'subscribe', get_lang('Subscription'), get_lang('Allowed'), 1);
$group2[] = $form->createElement('radio', 'subscribe', null, get_lang('Denied'), 0);

$myButton = $form->addButtonSave(get_lang('SaveSettings'), 'submit_save', true);
$myButton = $form->addButtonSave(get_lang('SaveSettings'), 'submit_save_access', true);

$group3[] = $form->createElement(
'radio',
Expand Down
4 changes: 3 additions & 1 deletion tests/behat/features/bootstrap/FeatureContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,11 @@ public function iHaveAPublicPasswordProtectedCourse($code, $password)
);
$this->pressButton('submit');
$this->visit('/main/course_info/infocours.php?cidReq='.$code);
$this->clickLink('Course access');
$this->waitForThePageToBeLoaded();
$this->assertPageContainsText('Course registration password');
$this->fillField('course_registration_password', $password);
$this->pressButton('submit_save');
$this->pressButton('update_course_submit_save_access');
$this->assertFieldContains('course_registration_password', $password);
}

Expand Down
17 changes: 7 additions & 10 deletions tests/behat/features/course.feature
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,10 @@ Feature: Course tools basic testing
And I am on "/main/course_info/maintenance.php"
Then I should not see an ".alert-danger" element

# Scenario: Enter to public password-protected course
# Given I have a public password-protected course named "PASSWORDPROTECTED" with password "123456"
# And I am not logged
# And I am on "/courses/PASSWORDPROTECTED/index.php"
# When I fill in "course_password" with "123456"
# And I press "submit"
# Then I should not see "The course password is incorrect"



Scenario: Enter to public password-protected course
Given I have a public password-protected course named "PASSWORDPROTECTED" with password "123456"
And I am not logged
And I am on "/courses/PASSWORDPROTECTED/index.php"
When I fill in "course_password" with "123456"
And I press "submit"
Then I should not see "The course password is incorrect"