Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
@mod @mod_assignFeature: Duplicate assign activity module with permissionsIn order to ensure that locally assigned roles and permissions are correctly duplicatedAs a teacherI need to add the roles and permissions and ensure they are correctly duplicatedBackground:Given the following "courses" exist:| fullname | shortname | category | groupmode || Course 1 | C1 | 0 | 1 |And the following "users" exist:| username | firstname | lastname | email || teacher1 | Teacher | 1 | teacher1@example.com || student1 | Student | 1 | student10@example.com || student2 | Student | 2 | student20@example.com |And the following "course enrolments" exist:| user | course | role || teacher1 | C1 | editingteacher || student1 | C1 | student || student2 | C1 | student |And the following "activity" exists:| activity | assign || course | C1 || name | Test assignment name || intro | Test assignment description || markingworkflow | 1 || submissiondrafts | 0 |@javascriptScenario: Add a locally assigned role and duplicate activityGiven I log in as "teacher 1"And I am on "Course 1" course homepage with editing mode onWhen I open "Test assignment name" actions menuAnd I click on "Assign roles" "link" in the "Test assignment name" activityAnd I click on "Non-editing teacher" "link"And I click on "Student 2" "option"And I click on "Add" "button"And I am on "Course 1" course homepage with editing mode onAnd I duplicate "Test assignment name" activityThen I should see "Test assignment name (copy)"And I open "Test assignment name (copy)" actions menuAnd I click on "Assign roles" "link" in the "Test assignment name (copy)" activityThen "Non-editing teacher" row "Users with role" column of "generaltable" table should contain "1"@javascriptScenario: Add a permission override to activity and duplicateGiven the following "permission overrides" exist:| capability | permission | role | contextlevel | reference || mod/assign:grade | Allow | student | 70 | Test assignment name |And I log in as "admin"When I am on "Course 1" course homepage with editing mode onAnd I duplicate "Test assignment name" activityThen I should see "Test assignment name (copy)"And I open "Test assignment name (copy)" actions menuAnd I click on "Edit settings" "link" in the "Test assignment name (copy)" activityAnd I navigate to "Permissions" in current page administrationAnd I set the field "permissionscapabilitysearch" to "mod/assign:grade"Then "Grade assignmentmod/assign:grade" row "Roles with permission" column of "permissions" table should contain "Student"