AutorÃa | Ultima modificación | Ver Log |
@core @core_blockFeature: Allowed blocks controlsIn order to prevent the use of some blocksAs an adminI need to restrict some blocks to be used in coursesBackground: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 |Scenario: Blocks can be added with the default permissionsGiven I log in as "teacher1"And I am on "Course 1" course homepage with editing mode onWhen I add the "Course completion status" blockAnd I add the "Activities" blockThen I should see "Activities" in the "Activities" "block"And I should see "Course completion status" in the "Course completion status" "block"Scenario: Blocks can not be added when the admin restricts the permissionsGiven the following "role capability" exists:| role | editingteacher || block/activity_modules:addinstance | prohibit |And I log in as "admin"And I am on the "Course 1" "permissions" pageAnd I override the system permissions of "Teacher" role with:| block/completionstatus:addinstance | Prohibit |And I log outWhen I log in as "teacher1"And I am on "Course 1" course homepage with editing mode onThen the add block selector should not contain "Activities" blockAnd the add block selector should not contain "Course completion status" block