AutorÃa | Ultima modificación | Ver Log |
@mod @mod_h5pactivity @core_h5pFeature: Add H5P activity context lockingIn order to let users access a H5P attemptsAs a userI need to access attempts reports even if no more users can submit attemptsBackground:Given the following config values are set as admin:| contextlocking | 1 |And the following "users" exist:| username | firstname | lastname | email || teacher1 | Teacher | 1 | teacher1@example.com || student1 | Student | 1 | student1@example.com || student2 | Student | 2 | student2@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 || student1 | C1 | student || student2 | C1 | student |# This test is only about reporting, we don't need to specify any valid H5P file for it.And the following "activity" exists:| activity | h5pactivity || name | H5P package || intro | Test H5P description || course | C1 || idnumber | h5ppackage |And the following "mod_h5pactivity > attempt" exists:| user | student1 || h5pactivity | H5P package || attempt | 1 || interactiontype | compound || rawscore | 2 || maxscore | 2 || duration | 4 || completion | 1 || success | 1 |Scenario: Access participants report on a freeze contextGiven the "h5ppackage" "Activity module" is context frozenAnd I am on the "H5P package" "h5pactivity activity" page logged in as adminWhen I navigate to "Attempts report" in current page administrationThen I should see "Student 1"And I should see "View (1)" in the "Student 1" "table_row"And I should see "Student 2"And I should not see "Teacher 1"Scenario: Access own attempts on a freeze contextGiven the "h5ppackage" "Activity module" is context frozenAnd I am on the "H5P package" "h5pactivity activity" page logged in as student1When I navigate to "Attempts report" in current page administrationAnd I follow "View report"Then I should see "Attempt #1: Student 1"And I should see "This attempt is completed"Scenario: Access participants report without any user with submit capabilityGiven the following "permission overrides" exist:| capability | permission | role | contextlevel | reference || mod/h5pactivity:submit | Prohibit | student | System | |And I am on the "H5P package" "h5pactivity activity" page logged in as adminWhen I navigate to "Attempts report" in current page administrationThen I should see "Student 1"And I should see "View (1)" in the "Student 1" "table_row"And I should see "Student 2"And I should not see "Teacher 1"Scenario: Access participant report to list students with submit capability but no view oneGiven the following "permission overrides" exist:| capability | permission | role | contextlevel | reference || mod/h5pactivity:view | Prohibit | student | System | |And I am on the "H5P package" "h5pactivity activity" page logged in as adminWhen I navigate to "Attempts report" in current page administrationThen I should see "No participants to display"Scenario: Access participant report but with no users with view or submit capabilityGiven the following "permission overrides" exist:| capability | permission | role | contextlevel | reference || mod/h5pactivity:submit | Prohibit | student | System | || mod/h5pactivity:view | Prohibit | student | System | |And I am on the "H5P package" "h5pactivity activity" page logged in as adminWhen I navigate to "Attempts report" in current page administrationThen I should see "No participants to display"Scenario: Access participant report in a hidden activityGiven I log in as "admin"And I am on "Course 1" course homepage with editing mode onAnd I click on "Hide" "link" in the "H5P package" activityWhen I am on the "H5P package" "h5pactivity activity" pageAnd I navigate to "Attempts report" in current page administrationThen I should see "Student 1"And I should see "View (1)"And I should see "Student 2"And I should not see "Teacher 1"