Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
@core @core_course @_cross_browserFeature: Toggle activities visibility from the course pageIn order to delay activities availabilityAs a teacherI need to quickly change the visibility of an activityBackground:Given the following "users" exist:| username | firstname | lastname | email || teacher1 | Teacher | 1 | teacher1@example.com || student1 | Student | 1 | student1@example.com |And the following "courses" exist:| fullname | shortname | format | numsections || Course 1 | C1 | topics | 2 |And the following "course enrolments" exist:| user | course | role || teacher1 | C1 | editingteacher || student1 | C1 | student |And the following "activities" exist:| activity | course | section | idnumber | name | intro | id_visible || assign | C1 | 1 | 1 | Test assignment name | Test assignment description | 1 |And the following "blocks" exist:| blockname | contextlevel | reference | pagetypepattern | defaultregion || recent_activity | Course | C1 | course-view-* | side-pre |@javascriptScenario: Hide/Show toggle with javascript enabledGiven the following "activity" exists:| activity | forum || course | C1 || idnumber | C1F1 || name | Test forum name || visible | 1 |And I log in as "teacher1"And I am on "Course 1" course homepage with editing mode onWhen I open "Test forum name" actions menuAnd I choose "Hide" in the open action menuThen "Test forum name" activity should be hiddenAnd I open "Test forum name" actions menuAnd I choose "Show" in the open action menuAnd "Test forum name" activity should be visibleAnd I open "Test forum name" actions menuAnd I choose "Hide" in the open action menuAnd "Test forum name" activity should be hiddenAnd I reload the pageAnd "Test forum name" activity should be hidden# Make sure that "Availability" dropdown in the edit menu has two options: Show/Hide.And I open "Test forum name" actions menuAnd I click on "Edit settings" "link" in the "Test forum name" activityAnd I expand all fieldsetsAnd the "Availability" select box should contain "Show on course page"And the "Availability" select box should not contain "Make available but don't show on course page"And the field "Availability" matches value "Hide on course page"And I press "Save and return to course"And "Test forum name" activity should be hidden# Student should not see this activity.And I am on the "Course 1" course page logged in as student1And I should not see "Test forum name"@javascriptScenario: Activities can be made available and unavailable inside a hidden sectionGiven the following "activity" exists:| activity | forum || course | C1 || idnumber | C1F1 || section | 2 || name | Test forum name || visible | 1 |And I log in as "teacher1"And I am on "Course 1" course homepage with editing mode onWhen I hide section "2"And "Test forum name" activity should be hiddenAnd I open "Test forum name" actions menuAnd I choose "Availability > Make available but don't show on course page" in the open action menuThen "Test forum name" activity should be available but hidden from course pageAnd I open "Test forum name" actions menuAnd I choose "Availability > Hide on course page" in the open action menuAnd "Test forum name" activity should be hidden# Make sure that "Availability" dropdown in the edit menu has three options.And I open "Test forum name" actions menuAnd I click on "Edit settings" "link" in the "Test forum name" activityAnd I expand all fieldsetsAnd the "Availability" select box should contain "Hide on course page"And the "Availability" select box should contain "Make available but don't show on course page"And the "Availability" select box should not contain "Show on course page"And I set the field "Availability" to "Make available but don't show on course page"And I press "Save and return to course"And "Test forum name" activity should be available but hidden from course pageAnd I turn editing mode offAnd "Test forum name" activity should be available but hidden from course page# Student will not see the module on the course page but can access it from other reports and blocks:And I am on the "Course 1" course page logged in as student1And "Test forum name" activity should be hiddenAnd I click on "Test forum name" "link" in the "Recent activity" "block"And I should see "Test forum name"And I should see "There are no discussion topics yet in this forum"@javascriptScenario: Activities can be made available but not visible on a course pageGiven the following config values are set as admin:| allowstealth | 1 |And I log in as "teacher1"And I am on "Course 1" course homepage with editing mode onWhen I open "Test assignment name" actions menuAnd I choose "Availability > Make available but don't show on course page" in the open action menuThen "Test assignment name" activity should be available but hidden from course page# Make sure that "Availability" dropdown in the edit menu has three options.And I open "Test assignment name" actions menuAnd I click on "Edit settings" "link" in the "Test assignment name" activityAnd I expand all fieldsetsAnd the "Availability" select box should contain "Show on course page"And the "Availability" select box should contain "Hide on course page"And the field "Availability" matches value "Make available but don't show on course page"And I press "Save and return to course"And "Test assignment name" activity should be available but hidden from course pageAnd I turn editing mode offAnd "Test assignment name" activity should be available but hidden from course pageAnd I log out# Student will not see the module on the course page but can access it from other reports and blocks:And I log in as "student1"And I am on "Course 1" course homepageAnd "Test assignment name" activity should be hiddenAnd I click on "Test assignment name" "link" in the "Recent activity" "block"And I should see "Test assignment name"And I should see "Submission status"And I log out