AutorÃa | Ultima modificación | Ver Log |
@core @core_courseFeature: Allow teachers to edit the visibility of activity dates in a courseIn order to show students the activity dates in a courseAs a teacherI need to be able to edit activity dates settingsBackground:Given the following "users" exist:| username | firstname | lastname | email || teacher1 | Teacher | 1 | teacher1@example.com |And the following "courses" exist:| fullname | shortname | category || Course 1 | C1 | 0 |And the following "course enrolments" exist:| user | course | role || teacher1 | C1 | editingteacher |And the following "activities" exist:| activity | course | idnumber | name | intro | timeopen | timeclose || choice | C1 | choice1 | Test choice | Test choice description | ##yesterday## | ##tomorrow## |Scenario: Activity dates setting can be enabled to display activity dates in a courseGiven I log in as "teacher1"And I am on "Course 1" course homepage with editing mode onAnd I navigate to "Settings" in current page administrationWhen I set the following fields to these values:| Show activity dates | Yes |And I click on "Save and display" "button"And I follow "Test choice"Then the activity date information in "Test choice" should existAnd the activity date in "Test choice" should contain "Opened:"And the activity date in "Test choice" should contain "Closes:"And I am on "Course 1" course homepage# When showactivitydates is enabled, activity dates should be shown on the course homepage.And the activity date information in "Test choice" should existAnd the activity date in "Test choice" should contain "Opened:"And the activity date in "Test choice" should contain "Closes:"Scenario: Activity dates setting can be disabled to hide activity dates in a courseGiven I log in as "teacher1"And I am on "Course 1" course homepage with editing mode onAnd I navigate to "Settings" in current page administrationWhen I set the following fields to these values:| Show activity dates | No |And I click on "Save and display" "button"And I follow "Test choice"# Activity dates are always shown in the module's view page.Then the activity date information in "Test choice" should existAnd the activity date in "Test choice" should contain "Opened:"And the activity date in "Test choice" should contain "Closes:"And I am on "Course 1" course homepage# When showactivitydates is disabled, activity dates should not be shown on the course homepage.And the activity date information in "Test choice" should not existScenario: Default activity dates setting default value can changed to NoGiven I log in as "admin"And I navigate to "Courses > Default settings > Course default settings" in site administrationWhen I set the following fields to these values:| Show activity dates | No |And I click on "Save changes" "button"And I navigate to "Courses > Add a new course" in site administrationThen the field "showactivitydates" matches value "No"Scenario: Default activity dates setting default value can changed to YesGiven I log in as "admin"And I navigate to "Courses > Default settings > Course default settings" in site administrationWhen I set the following fields to these values:| Show activity dates | Yes |And I click on "Save changes" "button"And I navigate to "Courses > Add a new course" in site administrationThen the field "showactivitydates" matches value "Yes"