AutorÃa | Ultima modificación | Ver Log |
@core @core_courseFeature: Activities content download can be controlledIn order to allow or restrict access to download activity contentAs a teacherI can disable the content download of an activityBackground:Given the following "users" exist:| username | firstname | lastname | email || teacher1 | Teacher | 1 | teacher1@example.com || student1 | Student | 1 | student1@example.com || manager1 | Manager | 1 | manager1@example.com |And the following "courses" exist:| fullname | shortname || Course 1 | C1 |And the following "course enrolments" exist:| user | course | role || teacher1 | C1 | editingteacher || student1 | C1 | student || manager1 | C1 | manager |And the following "activities" exist:| activity | name | intro | introformat | course || page | Page1 | PageDesc1 | 1 | C1 |And the following "activities" exist:| activity | name | intro | introformat | course | downloadcontent || folder | Folder1 | FolderDesc1 | 1 | C1 | 0 |And I log in as "admin"And the following config values are set as admin:| downloadcoursecontentallowed | 1 |And I log outScenario: "Include in course content download" field default is set to "Yes" if nothing has been setGiven I am on the Page1 "Page Activity editing" page logged in as adminThen the field "Include in course content download" matches value "Yes"Scenario: "Include in course content download" field is not visible if course content is disabled on site levelGiven I log in as "admin"And the following config values are set as admin:| downloadcoursecontentallowed | 0 |And I am on the Page1 "Page Activity editing" pageThen "Include in course content download" "select" should not existScenario: "Include in course content download" field is visible even if course content is disabled on course levelGiven I log in as "admin"And I am on "Course 1" course homepageAnd I navigate to "Settings" in current page administrationWhen I set the field "Enable download course content" to "No"And I press "Save and display"And I am on the Page1 "Page Activity editing" pageThen "Include in course content download" "select" should existScenario: "Include in course content download" field should be visible but not editable for users without configuredownloadcontent capabilityGiven I log in as "manager1"And I am on the Folder1 "Folder Activity editing" pageAnd "Include in course content download" "field" should existAnd the following "role capability" exists:| role | manager || moodle/course:configuredownloadcontent | prohibit |When I am on the Folder1 "Folder Activity editing" pageThen I should see "Include in course content download"And I should see "No"And "Include in course content download" "select" should not exist