AutorÃa | Ultima modificación | Ver Log |
@core @core_myFeature: Restrict which blocks can be added to DashboardIn order to restrict which blocks can be addedAs a student I need to ensure I can add the blocksAs an admin I need to remove the capability to add a blocksAs a student I need to ensure I can't add the blocks any moreBackground:Given the following "users" exist:| username | firstname | lastname | email || student1 | Student | 1 | student1@example.com |And the following "courses" exist:| fullname | shortname | format || Course 1 | C1 | topics |And the following "course enrolments" exist:| user | course | role || student1 | C1 | student |Scenario: The comments block can be added to Dashboard by defaultAnd I log in as "student1"And I turn editing mode onThen the add block selector should contain "Comments" blockAnd the add block selector should contain "Text" blockAnd the add block selector should contain "Tags" blockScenario: Remove the ability to add the comments block to DashboardGiven the following "role capability" exists:| role | user || block/comments:myaddinstance | prohibit || block/course_list:myaddinstance | prohibit || block/html:myaddinstance | prohibit |When I log in as "student1"And I turn editing mode onThen the add block selector should not contain "Comments" blockAnd the add block selector should not contain "Courses" blockAnd the add block selector should not contain "Text" blockAnd the add block selector should contain "Tags" block