MDL-52206 completion: Behat test

Co-authored-by: aanabit
This commit is contained in:
Peter 2019-12-09 12:50:30 +08:00 committed by Peter Dias
parent 2c7893cf9f
commit 7a9e3db9dc
11 changed files with 1092 additions and 8 deletions

View File

@ -17,8 +17,9 @@ Feature: Enable Block Completion in a course using activity completion
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activities" exist:
| activity | course | idnumber | name | intro |
| page | C1 | page1 | Test page name | Test page description |
| activity | course | idnumber | name | intro |
| page | C1 | page1 | Test page name | Test page description |
| assign | C1 | assign1 | Test assign name | Test page description |
Scenario: Add the block to a the course and add course completion items
Given I log in as "teacher1"
@ -65,3 +66,71 @@ Feature: Enable Block Completion in a course using activity completion
And I should see "1 of 1" in the "Activity completion" "table_row"
And I follow "More details"
And I should see "Yes" in the "Activity completion" "table_row"
@javascript
Scenario: Add the block to a the course and add course completion items with passing grade
Given I am on the "Test assign name" "assign activity" page logged in as teacher1
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Completion tracking | Show activity as complete when conditions are met |
| completionusegrade | 1 |
| completionpassgrade | 1 |
| gradepass | 50 |
And I press "Save and return to course"
And I am on the "Test assign name" "assign activity" page
And I navigate to "View all submissions" in current page administration
And I click on "Grade" "link" in the "Student" "table_row"
And I set the field "Grade out of 100" to "53"
And I set the field "Notify students" to "0"
And I press "Save changes"
And I am on "Course 1" course homepage with editing mode on
And I add the "Course completion status" block
And I navigate to "Course completion" in current page administration
And I expand all fieldsets
And I set the following fields to these values:
| Test assign name | 1 |
And I press "Save changes"
And I log out
When I am on the "Test assign name" "assign activity" page logged in as student1
And I am on "Course 1" course homepage
Then I should see "Status: Pending" in the "Course completion status" "block"
And I should see "0 of 1" in the "Activity completion" "table_row"
And I trigger cron
And I am on "Course 1" course homepage
And I follow "More details"
And I should see "Achieving grade, Achieving passing grade" in the "Activity completion" "table_row"
And I should see "Yes" in the "Activity completion" "table_row"
@javascript
Scenario: Add the block to a the course and add course completion items with failing grade.
Given I am on the "Test assign name" "assign activity" page logged in as teacher1
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Completion tracking | Show activity as complete when conditions are met |
| completionusegrade | 1 |
| completionpassgrade | 1 |
| gradepass | 50 |
And I press "Save and return to course"
And I am on the "Test assign name" "assign activity" page
And I navigate to "View all submissions" in current page administration
And I click on "Grade" "link" in the "Student" "table_row"
And I set the field "Grade out of 100" to "49"
And I set the field "Notify students" to "0"
And I press "Save changes"
And I am on "Course 1" course homepage with editing mode on
And I add the "Course completion status" block
And I navigate to "Course completion" in current page administration
And I expand all fieldsets
And I set the following fields to these values:
| Test assign name | 1 |
And I press "Save changes"
And I log out
When I am on the "Test assign name" "assign activity" page logged in as student1
And I am on "Course 1" course homepage
Then I should see "Status: Pending" in the "Course completion status" "block"
And I should see "0 of 1" in the "Activity completion" "table_row"
And I trigger cron
And I am on "Course 1" course homepage
And I follow "More details"
And I should see "Achieving grade, Achieving passing grade" in the "Activity completion" "table_row"
And I should see "Yes" in the "Activity completion" "table_row"

View File

@ -1,14 +1,10 @@
@core @core_completion
@core @core_completion @javascript
Feature: Allow teachers to bulk edit activity completion rules in a course.
In order to avoid editing single activities
As a teacher
I need to be able to edit the completion rules for a group of activities.
# Given I am a teacher in a course with completion tracking enabled and activities present.
# When I bulk edit activity completion rules for activities of the same kind.
# Then the completion rules should be updated for all selected activities.
@javascript
Scenario: Bulk edit activity completion rules
Background:
Given the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
@ -32,6 +28,14 @@ Feature: Allow teachers to bulk edit activity completion rules in a course.
And I set the following fields to these values:
| Enable completion tracking | Yes |
And I press "Save and display"
And I log out
# Given I am a teacher in a course with completion tracking enabled and activities present.
# When I bulk edit activity completion rules for activities of the same kind.
# Then the completion rules should be updated for all selected activities.
Scenario: Bulk edit activity completion rules
Given I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
When I navigate to "Course completion" in current page administration
And I follow "Bulk edit activity completion"
And I click on "Test assignment one" "checkbox"
@ -56,3 +60,29 @@ Feature: Allow teachers to bulk edit activity completion rules in a course.
And I should see "Student must receive a grade to complete this activity" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' row ')][.//*[text() = 'Test assignment two']]" "xpath_element"
And I should see "Student must submit to this activity to complete it" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' row ')][.//*[text() = 'Test assignment two']]" "xpath_element"
And I should not see "Completion expected on" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' row ')][.//*[text() = 'Test assignment two']]" "xpath_element"
# Same conditions as above,
# However if completionpassgrade is set, only the completionpassgrade detail should be shown.
# It is implied requires grade is selected as it passgrade is dependent on it.
Scenario: Bulk edit passing grade completion
Given I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
When I navigate to "Course completion" in current page administration
And I follow "Bulk edit activity completion"
And I click on "Test assignment one" "checkbox"
And I click on "Test assignment two" "checkbox"
And I click on "Edit" "button"
And I should see "Completion tracking"
And I should see "The changes will affect the following 2 activities or resources:"
And I should see "Student must submit to this activity to complete it"
And I select "Show activity as complete when conditions are met" from the "completion" singleselect
And I click on "completionusegrade" "checkbox"
And I click on "completionpassgrade" "checkbox"
And I click on "Save changes" "button"
Then I should see "Changes saved"
And I should see "With conditions" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' row ')][.//*[text() = 'Test assignment one']]" "xpath_element"
And I should see "Student must receive a passing grade to complete this activity" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' row ')][.//*[text() = 'Test assignment one']]" "xpath_element"
And I should not see "Completion expected on" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' row ')][.//*[text() = 'Test assignment one']]" "xpath_element"
And I should see "With conditions" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' row ')][.//*[text() = 'Test assignment two']]" "xpath_element"
And I should see "Student must receive a passing grade to complete this activity" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' row ')][.//*[text() = 'Test assignment two']]" "xpath_element"
And I should not see "Completion expected on" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' row ')][.//*[text() = 'Test assignment two']]" "xpath_element"

View File

@ -0,0 +1,52 @@
@core @core_completion
Feature: Students will be marked as completed if they have achieved a passing grade.
Background:
Given the following "courses" exist:
| fullname | shortname | category | enablecompletion |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | Frist | teacher1@example.com |
| student1 | Student | First | student1@example.com |
| student2 | Student | Second | student2@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:
| idnumber | a1 |
| activity | assign |
| course | C1 |
| name | Test assignment name |
| intro | Submit your online text |
| assignsubmission_onlinetext_enabled | 1 |
| assignsubmission_file_enabled | 0 |
| completion | 2 |
| completionpassgrade | 1 |
| completionusegrade | 1 |
| gradepass | 50 |
And I log in as "teacher1"
And I am on "Course 1" course homepage
And "Student First" user has not completed "Test assignment name" activity
And I log out
Scenario: Passing grade completion
Given I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "21" to the user "Student First" for the grade item "Test assignment name"
And I give the grade "50" to the user "Student Second" for the grade item "Test assignment name"
And I press "Save changes"
And I log out
When I log in as "student1"
And I am on "Course 1" course homepage
And the "Receive a grade" completion condition of "Test assignment name" is displayed as "done"
And the "Receive a passing grade" completion condition of "Test assignment name" is displayed as "failed"
And I log out
And I log in as "student2"
And I am on "Course 1" course homepage
And the "Receive a grade" completion condition of "Test assignment name" is displayed as "done"
And the "Receive a passing grade" completion condition of "Test assignment name" is displayed as "done"

View File

@ -0,0 +1,69 @@
@core @core_completion
Feature: Students will be marked as completed and pass/fail
if they have viewed an activity and achieved a grade.
Background:
Given the following "courses" exist:
| fullname | shortname | category | enablecompletion |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | Frist | teacher1@example.com |
| student1 | Student | First | student1@example.com |
| student2 | Student | Second | student2@example.com |
| student3 | Student | Third | student3@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
And the following "activity" exists:
| activity | assign |
| course | C1 |
| idnumber | a1 |
| name | Test assignment name |
| intro | Submit your online text |
| assignsubmission_onlinetext_enabled | 1 |
| assignsubmission_file_enabled | 0 |
| completion | 2 |
| completionview | 1 |
| completionusegrade | 1 |
| gradepass | 50 |
| completionpassgrade | 1 |
And I log in as "teacher1"
And I am on "Course 1" course homepage
And "Student First" user has not completed "Test assignment name" activity
And I log out
And I am on the "Test assignment name" "assign activity" page logged in as student2
And I log out
And I am on the "Test assignment name" "assign activity" page logged in as student1
And I log out
Scenario: Confirm completion (incomplete/pass/fail) are set correctly
Given I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "21" to the user "Student First" for the grade item "Test assignment name"
And I give the grade "50" to the user "Student Second" for the grade item "Test assignment name"
And I give the grade "30" to the user "Student Third" for the grade item "Test assignment name"
And I press "Save changes"
And I log out
When I log in as "student1"
And I am on "Course 1" course homepage
And the "View" completion condition of "Test assignment name" is displayed as "done"
And the "Receive a grade" completion condition of "Test assignment name" is displayed as "done"
And the "Receive a passing grade" completion condition of "Test assignment name" is displayed as "failed"
And I log out
And I log in as "student2"
And I am on "Course 1" course homepage
And the "View" completion condition of "Test assignment name" is displayed as "done"
And the "Receive a grade" completion condition of "Test assignment name" is displayed as "done"
And the "Receive a passing grade" completion condition of "Test assignment name" is displayed as "done"
And I log out
And I log in as "student3"
And I am on "Course 1" course homepage
And the "View" completion condition of "Test assignment name" is displayed as "todo"
And the "Receive a grade" completion condition of "Test assignment name" is displayed as "done"
And the "Receive a passing grade" completion condition of "Test assignment name" is displayed as "failed"

View File

@ -0,0 +1,177 @@
@mod @mod_data @core_completion
Feature: Completion pass grade
View activity completion in the database activity
In order to have visibility of database completion requirements
As a student
I need to be able to view my database completion progress
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| student1 | Vinnie | Student1 | student1@example.com |
| student2 | Vinnie | Student2 | student2@example.com |
| teacher1 | Darrell | Teacher1 | teacher1@example.com |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist:
| user | course | role |
| student1 | C1 | student |
| student2 | C1 | student |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Settings" in current page administration
And I expand all fieldsets
And I set the following fields to these values:
| Enable completion tracking | Yes |
| Show activity completion conditions | Yes |
And I press "Save and display"
And the following "activity" exists:
| activity | data |
| course | C1 |
| idnumber | mh1 |
| name | Music history |
| section | 1 |
And I am on the "Music history" "data activity" page
And I navigate to "Settings" in current page administration
And I expand all fieldsets
And I set the following fields to these values:
| Aggregate type | Average of ratings |
| scale[modgrade_type] | Point |
| scale[modgrade_point] | 100 |
| gradepass | 50 |
| Completion tracking | Show activity as complete when conditions are met |
| Require view | 1 |
| Require grade | 1 |
| completionpassgrade | 1 |
| completionentriesenabled | 1 |
| completionentries | 2 |
And I press "Save and display"
And I add a "Text input" field to "Music history" database and I fill the form with:
| Field name | Instrument types |
And I follow "Templates"
And I press "Save template"
And I log out
Scenario: View automatic completion items as a teacher and confirm all tabs display conditions
Given I log in as "teacher1"
And I am on "Course 1" course homepage
When I follow "Music history"
Then "Music history" should have the "View" completion condition
And "Music history" should have the "Make entries: 2" completion condition
And "Music history" should have the "Receive a grade" completion condition
And "Music history" should have the "Receive a passing grade" completion condition
And I follow "View single"
And "Music history" should have the "View" completion condition
And "Music history" should have the "Make entries: 2" completion condition
And "Music history" should have the "Receive a grade" completion condition
And "Music history" should have the "Receive a passing grade" completion condition
And I follow "Search"
And "Music history" should have the "View" completion condition
And "Music history" should have the "Make entries: 2" completion condition
And "Music history" should have the "Receive a grade" completion condition
And "Music history" should have the "Receive a passing grade" completion condition
And I follow "Add entry"
And "Music history" should have the "View" completion condition
And "Music history" should have the "Make entries: 2" completion condition
And "Music history" should have the "Receive a grade" completion condition
And "Music history" should have the "Receive a passing grade" completion condition
And I follow "Export"
And "Music history" should have the "View" completion condition
And "Music history" should have the "Make entries: 2" completion condition
And "Music history" should have the "Receive a grade" completion condition
And "Music history" should have the "Receive a passing grade" completion condition
And I follow "Templates"
And "Music history" should have the "View" completion condition
And "Music history" should have the "Make entries: 2" completion condition
And "Music history" should have the "Receive a grade" completion condition
And "Music history" should have the "Receive a passing grade" completion condition
And I follow "Fields"
And "Music history" should have the "View" completion condition
And "Music history" should have the "Make entries: 2" completion condition
And "Music history" should have the "Receive a grade" completion condition
And "Music history" should have the "Receive a passing grade" completion condition
And I follow "Presets"
And "Music history" should have the "View" completion condition
And "Music history" should have the "Make entries: 2" completion condition
And "Music history" should have the "Receive a grade" completion condition
And "Music history" should have the "Receive a passing grade" completion condition
@javascript
Scenario: View automatic completion items as a failing student
Given I am on the "Music history" "data activity" page logged in as student1
And the "View" completion condition of "Music history" is displayed as "done"
And the "Make entries: 2" completion condition of "Music history" is displayed as "todo"
And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
And the "Receive a passing grade" completion condition of "Music history" is displayed as "todo"
And I am on "Course 1" course homepage
And I add an entry to "Music history" database with:
| Instrument types | Drums |
And I press "Save and view"
# One entry is not enough to mark as complete.
And the "View" completion condition of "Music history" is displayed as "done"
And the "Make entries: 2" completion condition of "Music history" is displayed as "todo"
And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
And the "Receive a passing grade" completion condition of "Music history" is displayed as "todo"
And I am on "Course 1" course homepage
And I add an entry to "Music history" database with:
| Instrument types | Hurdygurdy |
And I press "Save and view"
Then the "View" completion condition of "Music history" is displayed as "done"
And the "Make entries: 2" completion condition of "Music history" is displayed as "done"
And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
And the "Receive a passing grade" completion condition of "Music history" is displayed as "todo"
And I log out
And I am on the "Music history" "data activity" page logged in as teacher1
And I follow "View single"
And I set the field "rating" to "3"
And I log out
When I am on the "Music history" "data activity" page logged in as student1
Then the "View" completion condition of "Music history" is displayed as "done"
And the "Make entries: 2" completion condition of "Music history" is displayed as "done"
And the "Receive a grade" completion condition of "Music history" is displayed as "done"
And the "Receive a passing grade" completion condition of "Music history" is displayed as "failed"
And I log out
And I log in as "teacher1"
And I am on "Course 1" course homepage
And "Vinnie Student1" user has completed "Music history" activity
@javascript
Scenario: View automatic completion items as a passing student
Given I am on the "Music history" "data activity" page logged in as student1
And the "View" completion condition of "Music history" is displayed as "done"
And the "Make entries: 2" completion condition of "Music history" is displayed as "todo"
And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
And the "Receive a passing grade" completion condition of "Music history" is displayed as "todo"
And I am on "Course 1" course homepage
And I add an entry to "Music history" database with:
| Instrument types | Drums |
And I press "Save and view"
# One entry is not enough to mark as complete.
And the "View" completion condition of "Music history" is displayed as "done"
And the "Make entries: 2" completion condition of "Music history" is displayed as "todo"
And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
And the "Receive a passing grade" completion condition of "Music history" is displayed as "todo"
And I am on "Course 1" course homepage
And I add an entry to "Music history" database with:
| Instrument types | Hurdygurdy |
And I press "Save and view"
And the "View" completion condition of "Music history" is displayed as "done"
And the "Make entries: 2" completion condition of "Music history" is displayed as "done"
And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
And the "Receive a passing grade" completion condition of "Music history" is displayed as "todo"
And I log out
And I am on the "Music history" "data activity" page logged in as teacher1
And I follow "View single"
And I set the field "rating" to "60"
And I log out
When I am on the "Music history" "data activity" page logged in as student1
Then the "View" completion condition of "Music history" is displayed as "done"
And the "Make entries: 2" completion condition of "Music history" is displayed as "done"
And the "Receive a grade" completion condition of "Music history" is displayed as "done"
And the "Receive a passing grade" completion condition of "Music history" is displayed as "done"
And I log out
And I log in as "teacher1"
And I am on "Course 1" course homepage
And "Vinnie Student1" user has completed "Music history" activity

View File

@ -0,0 +1,151 @@
@mod @mod_forum @core_completion
Feature: Completion pass grade view activity completion in the forum activity
In order to have visibility of forum completion requirements
As a student
I need to be able to view my forum completion progress
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| student1 | Vinnie | Student1 | student1@example.com |
| teacher1 | Darrell | Teacher1 | teacher1@example.com |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist:
| user | course | role |
| student1 | C1 | student |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Settings" in current page administration
And I expand all fieldsets
And I set the following fields to these values:
| Enable completion tracking | Yes |
| Show activity completion conditions | Yes |
And I press "Save and display"
And the following "activity" exists:
| activity | forum |
| course | C1 |
| idnumber | mh1 |
| name | Music history |
| section | 1 |
And I am on the "Music history" "forum activity" page
And I navigate to "Settings" in current page administration
And I expand all fieldsets
And I set the following fields to these values:
| Whole forum grading > Type | Point |
| Whole forum grading > Grade to pass | 50 |
| Completion tracking | Show activity as complete when conditions are met |
| Require view | 1 |
| Require grade | Whole forum |
| completionpostsenabled | 1 |
| completionpassgrade | 1 |
| completionposts | 2 |
| completiondiscussionsenabled | 1 |
| completiondiscussions | 1 |
| completionrepliesenabled | 1 |
| completionreplies | 1 |
And I press "Save and display"
And I log out
Scenario: View automatic completion items as a teacher
Given I am on the "Music history" "forum activity" page logged in as teacher1
Then "Music history" should have the "View" completion condition
And "Music history" should have the "Start discussions: 1" completion condition
And "Music history" should have the "Make forum posts: 2" completion condition
And "Music history" should have the "Post replies: 1" completion condition
And "Music history" should have the "Receive a grade" completion condition
And "Music history" should have the "Receive a passing grade" completion condition
@javascript
Scenario: View automatic completion items as a failing student
Given I am on the "Music history" "forum activity" page logged in as student1
And the "View" completion condition of "Music history" is displayed as "done"
And the "Start discussions: 1" completion condition of "Music history" is displayed as "todo"
And the "Make forum posts: 2" completion condition of "Music history" is displayed as "todo"
And the "Post replies: 1" completion condition of "Music history" is displayed as "todo"
And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
And the "Receive a passing grade" completion condition of "Music history" is displayed as "todo"
And I add a new discussion to "Music history" forum with:
| Subject | Fun instruments |
| Message | I like drums |
And I am on the "Music history" "forum activity" page
And the "View" completion condition of "Music history" is displayed as "done"
And the "Start discussions: 1" completion condition of "Music history" is displayed as "done"
And the "Make forum posts: 2" completion condition of "Music history" is displayed as "todo"
And the "Post replies: 1" completion condition of "Music history" is displayed as "todo"
And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
And the "Receive a passing grade" completion condition of "Music history" is displayed as "todo"
And I reply "Fun instruments" post from "Music history" forum with:
| Subject | Reply 1 to Fun instruments |
| Message | Guitar is also Fun |
And I am on the "Music history" "forum activity" page
And the "View" completion condition of "Music history" is displayed as "done"
And the "Start discussions: 1" completion condition of "Music history" is displayed as "done"
And the "Make forum posts: 2" completion condition of "Music history" is displayed as "done"
And the "Post replies: 1" completion condition of "Music history" is displayed as "done"
And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
And the "Receive a passing grade" completion condition of "Music history" is displayed as "todo"
And I log out
# Grade the student
And I am on the "Music history" "forum activity" page logged in as teacher1
And I press "Grade users"
And I set the field "grade" to "33"
And I press "Save"
And I press "Close grader"
And I log out
# All conditions should now be completed.
When I am on the "Music history" "forum activity" page logged in as student1
Then the "View" completion condition of "Music history" is displayed as "done"
And the "Start discussions: 1" completion condition of "Music history" is displayed as "done"
And the "Make forum posts: 2" completion condition of "Music history" is displayed as "done"
And the "Post replies: 1" completion condition of "Music history" is displayed as "done"
And the "Receive a grade" completion condition of "Music history" is displayed as "done"
And the "Receive a passing grade" completion condition of "Music history" is displayed as "failed"
@javascript
Scenario: View automatic completion items as a passing student
Given I am on the "Music history" "forum activity" page logged in as student1
And the "View" completion condition of "Music history" is displayed as "done"
And the "Start discussions: 1" completion condition of "Music history" is displayed as "todo"
And the "Make forum posts: 2" completion condition of "Music history" is displayed as "todo"
And the "Post replies: 1" completion condition of "Music history" is displayed as "todo"
And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
And the "Receive a passing grade" completion condition of "Music history" is displayed as "todo"
And I add a new discussion to "Music history" forum with:
| Subject | Fun instruments |
| Message | I like drums |
And I am on the "Music history" "forum activity" page
And the "View" completion condition of "Music history" is displayed as "done"
And the "Start discussions: 1" completion condition of "Music history" is displayed as "done"
And the "Make forum posts: 2" completion condition of "Music history" is displayed as "todo"
And the "Post replies: 1" completion condition of "Music history" is displayed as "todo"
And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
And the "Receive a passing grade" completion condition of "Music history" is displayed as "todo"
And I reply "Fun instruments" post from "Music history" forum with:
| Subject | Reply 1 to Fun instruments |
| Message | Guitar is also Fun |
And I am on the "Music history" "forum activity" page
And the "View" completion condition of "Music history" is displayed as "done"
And the "Start discussions: 1" completion condition of "Music history" is displayed as "done"
And the "Make forum posts: 2" completion condition of "Music history" is displayed as "done"
And the "Post replies: 1" completion condition of "Music history" is displayed as "done"
And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
And the "Receive a passing grade" completion condition of "Music history" is displayed as "todo"
And I log out
# Grade the student
And I am on the "Music history" "forum activity" page logged in as teacher1
And I press "Grade users"
And I set the field "grade" to "60"
And I press "Save"
And I press "Close grader"
And I log out
# All conditions should now be completed.
When I am on the "Music history" "forum activity" page logged in as student1
Then the "View" completion condition of "Music history" is displayed as "done"
And the "Start discussions: 1" completion condition of "Music history" is displayed as "done"
And the "Make forum posts: 2" completion condition of "Music history" is displayed as "done"
And the "Post replies: 1" completion condition of "Music history" is displayed as "done"
And the "Receive a grade" completion condition of "Music history" is displayed as "done"
And the "Receive a passing grade" completion condition of "Music history" is displayed as "done"

View File

@ -0,0 +1,118 @@
@mod @mod_glossary @core_completion
Feature: Pass grade completion in the glossary activity
In order to have visibility of glossary completion requirements
As a student
I need to be able to view my glossary completion progress
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| student1 | Vinnie | Student1 | student1@example.com |
| teacher1 | Darrell | Teacher1 | teacher1@example.com |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist:
| user | course | role |
| student1 | C1 | student |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Settings" in current page administration
And I expand all fieldsets
And I set the following fields to these values:
| Enable completion tracking | Yes |
| Show activity completion conditions | Yes |
And I press "Save and display"
And the following "activity" exists:
| activity | glossary |
| course | C1 |
| idnumber | mh1 |
| name | Music history |
| section | 1 |
And I am on "Course 1" course homepage
And I follow "Music history"
And I navigate to "Settings" in current page administration
And I expand all fieldsets
And I set the following fields to these values:
| Aggregate type | Average of ratings |
| scale[modgrade_type] | Point |
| scale[modgrade_point] | 100 |
| Ratings > Grade to pass | 50 |
| Completion tracking | Show activity as complete when conditions are met |
| Require view | 1 |
| Require grade | 1 |
| completionpassgrade | 1 |
| completionentriesenabled | 1 |
| completionentries | 1 |
And I press "Save and display"
And I log out
Scenario: View automatic completion items as a teacher
Given I log in as "teacher1"
And I am on "Course 1" course homepage
When I follow "Music history"
Then "Music history" should have the "View" completion condition
And "Music history" should have the "Make entries: 1" completion condition
And "Music history" should have the "Receive a grade" completion condition
And "Music history" should have the "Receive a passing grade" completion condition
Scenario: View automatic completion items as a failing student
Given I am on the "Music history" "glossary activity" page logged in as student1
And the "View" completion condition of "Music history" is displayed as "done"
And the "Make entries: 1" completion condition of "Music history" is displayed as "todo"
And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
And the "Receive a passing grade" completion condition of "Music history" is displayed as "todo"
When I am on "Course 1" course homepage
And I follow "Music history"
And I press "Add a new entry"
And I set the following fields to these values:
| Concept | Blast beats |
| Definition | Repeated fast tempo hits combining bass, snare and cymbal |
And I press "Save changes"
And the "View" completion condition of "Music history" is displayed as "done"
And the "Make entries: 1" completion condition of "Music history" is displayed as "done"
And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
And the "Receive a passing grade" completion condition of "Music history" is displayed as "todo"
And I log out
And I am on the "Music history" "glossary activity" page logged in as teacher1
And I set the field "rating" to "3"
And I press "Rate"
And I log out
When I am on the "Music history" "glossary activity" page logged in as student1
Then the "View" completion condition of "Music history" is displayed as "done"
And the "Make entries: 1" completion condition of "Music history" is displayed as "done"
And the "Receive a grade" completion condition of "Music history" is displayed as "done"
And the "Receive a passing grade" completion condition of "Music history" is displayed as "failed"
Scenario: View automatic completion items as a passing student
Given I am on the "Music history" "glossary activity" page logged in as student1
And the "View" completion condition of "Music history" is displayed as "done"
And the "Make entries: 1" completion condition of "Music history" is displayed as "todo"
And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
And the "Receive a passing grade" completion condition of "Music history" is displayed as "todo"
When I am on "Course 1" course homepage
And I follow "Music history"
And I press "Add a new entry"
And I set the following fields to these values:
| Concept | Blast beats |
| Definition | Repeated fast tempo hits combining bass, snare and cymbal |
And I press "Save changes"
And the "View" completion condition of "Music history" is displayed as "done"
And the "Make entries: 1" completion condition of "Music history" is displayed as "done"
And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
And the "Receive a passing grade" completion condition of "Music history" is displayed as "todo"
And I log out
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I follow "Music history"
And I set the field "rating" to "60"
And I press "Rate"
And I log out
When I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Music history"
Then the "View" completion condition of "Music history" is displayed as "done"
And the "Make entries: 1" completion condition of "Music history" is displayed as "done"
And the "Receive a grade" completion condition of "Music history" is displayed as "done"
And the "Receive a passing grade" completion condition of "Music history" is displayed as "done"

View File

@ -0,0 +1,84 @@
@mod @mod_h5pactivity @core_h5p @_file_upload @_switch_iframe @javascript @core_completion
Feature: Pass grade activity completion information in the h5p activity
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| student1 | Vinnie | Student1 | student1@example.com |
| student2 | Vinnie | Student2 | student2@example.com |
| student3 | Vinnie | Student3 | student3@example.com |
| teacher1 | Darrell | Teacher1 | teacher1@example.com |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist:
| user | course | role |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
| teacher1 | C1 | editingteacher |
And I log in as "admin"
And I am on "Course 1" course homepage
And I navigate to "Settings" in current page administration
And I expand all fieldsets
And I set the following fields to these values:
| Enable completion tracking | Yes |
| Show activity completion conditions | Yes |
And I press "Save and display"
And I am on "Course 1" course homepage with editing mode on
And I add a "H5P" to section "1"
And I set the following fields to these values:
| Name | Music history |
| Completion tracking | Show activity as complete when conditions are met |
| Require view | 1 |
| Require grade | 1 |
| completionpassgrade | 1 |
| gradepass | 25 |
And I upload "h5p/tests/fixtures/filltheblanks.h5p" file to "Package file" filemanager
And I click on "Save and display" "button"
And I log out
Scenario: View automatic completion items
# Teacher view.
Given I am on the "Music history" "h5pactivity activity" page logged in as teacher1
# Given I log in as "teacher1"
# And I am on "Course 1" course homepage
# And I follow "Music history"
And "Music history" should have the "View" completion condition
And "Music history" should have the "Receive a grade" completion condition
And "Music history" should have the "Receive a passing grade" completion condition
And I log out
# Student view.
When I am on the "Music history" "h5pactivity activity" page logged in as student1
# When I log in as "student1"
# And I am on "Course 1" course homepage
# And I follow "Music history"
And I switch to "h5p-player" class iframe
And I switch to "h5p-iframe" class iframe
And I click on "Check" "button" in the ".h5p-question-buttons" "css_element"
And I reload the page
And I log out
And I am on the "Music history" "h5pactivity activity" page logged in as student2
And I switch to "h5p-player" class iframe
And I switch to "h5p-iframe" class iframe
And I set the field with xpath "//input[contains(@aria-label,\"Blank input 1 of 4\")]" to "Brasilia"
And I set the field with xpath "//input[contains(@aria-label,\"Blank input 2 of 4\")]" to "Washington"
And I set the field with xpath "//input[contains(@aria-label,\"Blank input 3 of 4\")]" to "Berlin"
And I set the field with xpath "//input[contains(@aria-label,\"Blank input 4 of 4\")]" to "Canberra"
And I click on "Check" "button" in the ".h5p-question-buttons" "css_element"
And I switch to the main frame
And I reload the page
Then the "View" completion condition of "Music history" is displayed as "done"
And the "Receive a grade" completion condition of "Music history" is displayed as "done"
And the "Receive a passing grade" completion condition of "Music history" is displayed as "done"
And I log out
And I am on the "Music history" "h5pactivity activity" page logged in as student1
And the "View" completion condition of "Music history" is displayed as "done"
And the "Receive a grade" completion condition of "Music history" is displayed as "done"
And the "Receive a passing grade" completion condition of "Music history" is displayed as "failed"
And I log out
And I log in as "teacher1"
And I am on "Course 1" course homepage
And "Vinnie Student1" user has completed "Music history" activity
And "Vinnie Student2" user has completed "Music history" activity
And "Vinnie Student3" user has not completed "Music history" activity

View File

@ -0,0 +1,105 @@
@mod @mod_lesson @core_completion
Feature: Pass grade activity completion in the lesson activity
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| student1 | Vinnie | Student1 | student1@example.com |
| student2 | Vinnie | Student2 | student2@example.com |
| student3 | Vinnie | Student3 | student3@example.com |
| teacher1 | Darrell | Teacher1 | teacher1@example.com |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist:
| user | course | role |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Settings" in current page administration
And I expand all fieldsets
And I set the following fields to these values:
| Enable completion tracking | Yes |
| Show activity completion conditions | Yes |
And I press "Save and display"
And the following "activity" exists:
| activity | lesson |
| course | C1 |
| idnumber | mh1 |
| name | Music history |
| section | 1 |
| gradepass | 50 |
| completion | 2 |
| completionview | 1 |
| completionusegrade | 1 |
| completionpassgrade | 1 |
| completionendreached | 1 |
| completiontimespentenabled | 1 |
| completiontimespent | 1 |
And I am on "Course 1" course homepage
And I follow "Music history"
And I follow "Add a question page"
And I set the field "Select a question type" to "Numerical"
And I press "Add a question page"
And I set the following fields to these values:
| Page title | Numerical question |
| Page contents | What is 1 + 2? |
| id_answer_editor_0 | 3 |
| id_jumpto_0 | End of lesson |
| id_enableotheranswers | 1 |
| id_jumpto_6 | Next page |
And I press "Save page"
And I log out
Scenario: View automatic completion items as a teacher
Given I log in as "teacher1"
And I am on "Course 1" course homepage
When I follow "Music history"
Then "Music history" should have the "View" completion condition
And "Music history" should have the "Spend at least 1 sec on this activity" completion condition
And "Music history" should have the "Go through the activity to the end" completion condition
And "Music history" should have the "Receive a grade" completion condition
And "Music history" should have the "Receive a passing grade" completion condition
Scenario: View automatic completion items as a student
Given I am on the "Music history" "lesson activity" page logged in as student1
And the "View" completion condition of "Music history" is displayed as "done"
And the "Spend at least 1 sec on this activity" completion condition of "Music history" is displayed as "todo"
And the "Go through the activity to the end" completion condition of "Music history" is displayed as "todo"
And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
And the "Receive a passing grade" completion condition of "Music history" is displayed as "todo"
When I am on "Course 1" course homepage
And I follow "Music history"
And I wait "2" seconds
And I reload the page
And the "View" completion condition of "Music history" is displayed as "done"
And the "Spend at least 1 sec on this activity" completion condition of "Music history" is displayed as "done"
And the "Go through the activity to the end" completion condition of "Music history" is displayed as "todo"
And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
And the "Receive a passing grade" completion condition of "Music history" is displayed as "todo"
And I set the field "Your answer" to "3"
And I press "Submit"
Then the "View" completion condition of "Music history" is displayed as "done"
And the "Spend at least 1 sec on this activity" completion condition of "Music history" is displayed as "done"
And the "Go through the activity to the end" completion condition of "Music history" is displayed as "done"
And the "Receive a grade" completion condition of "Music history" is displayed as "done"
And the "Receive a passing grade" completion condition of "Music history" is displayed as "done"
And I log out
And I am on the "Music history" "lesson activity" page logged in as student2
And I wait "2" seconds
And I set the field "Your answer" to "0"
And I press "Submit"
Then the "View" completion condition of "Music history" is displayed as "done"
And the "Spend at least 1 sec on this activity" completion condition of "Music history" is displayed as "done"
And the "Go through the activity to the end" completion condition of "Music history" is displayed as "done"
And the "Receive a grade" completion condition of "Music history" is displayed as "done"
And the "Receive a passing grade" completion condition of "Music history" is displayed as "failed"
And I log out
And I log in as "teacher1"
And I am on "Course 1" course homepage
And "Vinnie Student1" user has completed "Music history" activity
And "Vinnie Student2" user has completed "Music history" activity
And "Vinnie Student3" user has not completed "Music history" activity

View File

@ -0,0 +1,84 @@
@mod @mod_lti @core_completion @javascript
Feature: Pass grade activity completion information in the LTI activity
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| student1 | Vinnie | Student1 | student1@example.com |
| student2 | Vinnie | Student2 | student2@example.com |
| student3 | Vinnie | Student3 | student3@example.com |
| teacher1 | Darrell | Teacher1 | teacher1@example.com |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist:
| user | course | role |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
| teacher1 | C1 | editingteacher |
And the following "activities" exist:
| activity | name | course | idnumber |
| lti | Music history | C1 | lti1 |
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Settings" in current page administration
And I expand all fieldsets
And I set the following fields to these values:
| Enable completion tracking | Yes |
| Show activity completion conditions | Yes |
And I press "Save and display"
And I turn editing mode on
When I open "Music history" actions menu
And I click on "Edit settings" "link" in the "Music history" activity
And I set the following fields to these values:
| Completion tracking | Show activity as complete when conditions are met |
| Require view | 1 |
| Require grade | 1 |
| gradepass | 50 |
| completionpassgrade | 1 |
And I press "Save and return to course"
And I log out
Scenario: View automatic completion items as a teacher
Given I log in as "teacher1"
And I am on "Course 1" course homepage
When I follow "Music history"
Then "Music history" should have the "View" completion condition
And "Music history" should have the "Receive a grade" completion condition
And "Music history" should have the "Receive a passing grade" completion condition
Scenario: View automatic completion items as a student
Given I am on the "Music history" "lti activity" page logged in as student1
And the "View" completion condition of "Music history" is displayed as "done"
And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
And the "Receive a passing grade" completion condition of "Music history" is displayed as "todo"
And I log out
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "90.00" to the user "Vinnie Student1" for the grade item "Music history"
And I give the grade "20.00" to the user "Vinnie Student2" for the grade item "Music history"
And I press "Save changes"
And I log out
When I am on the "Music history" "lti activity" page logged in as student1
Then the "Receive a grade" completion condition of "Music history" is displayed as "done"
Then the "Receive a passing grade" completion condition of "Music history" is displayed as "done"
And the "View" completion condition of "Music history" is displayed as "done"
And I log out
When I am on the "Music history" "lti activity" page logged in as student2
Then the "Receive a grade" completion condition of "Music history" is displayed as "done"
Then the "Receive a passing grade" completion condition of "Music history" is displayed as "failed"
And the "View" completion condition of "Music history" is displayed as "done"
And I log out
When I am on the "Music history" "lti activity" page logged in as student3
Then the "Receive a grade" completion condition of "Music history" is displayed as "todo"
Then the "Receive a passing grade" completion condition of "Music history" is displayed as "todo"
And the "View" completion condition of "Music history" is displayed as "done"
And I log out
And I log in as "teacher1"
And I am on "Course 1" course homepage
And "Vinnie Student1" user has completed "Music history" activity
And "Vinnie Student2" user has completed "Music history" activity
And "Vinnie Student3" user has not completed "Music history" activity

View File

@ -0,0 +1,145 @@
@mod @mod_workshop @core_completion @javascript
Feature: Workshop submission and assessment with pass grade activity completion
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| student1 | Sam1 | Student1 | student1@example.com |
| student2 | Sam2 | Student2 | student2@example.com |
| student3 | Sam3 | Student3 | student3@example.com |
| student4 | Sam4 | Student4 | student3@example.com |
| teacher1 | Terry1 | Teacher1 | teacher1@example.com |
And the following "courses" exist:
| fullname | shortname | enablecompletion |
| Course1 | c1 | 1 |
And the following "course enrolments" exist:
| user | course | role |
| student1 | c1 | student |
| student2 | c1 | student |
| student3 | c1 | student |
| student4 | c1 | student |
| teacher1 | c1 | editingteacher |
And the following "activity" exists:
| activity | workshop |
| name | TestWorkshop |
| intro | Test workshop description |
| course | c1 |
| idnumber | workshop1 |
| submissiontypetext | 2 |
| submissiontypefile | 1 |
| completion | 2 |
| completiongradeitemnumber | 0 |
| submissiongradepass | 40 |
| gradinggradepass | 60 |
| completionpassgrade | 1 |
# teacher1 sets up assessment form and changes the phase to submission
When I am on the "TestWorkshop" "workshop activity" page logged in as teacher1
And I edit assessment form in workshop "TestWorkshop" as:"
| id_description__idx_0_editor | Aspect1 |
| id_description__idx_1_editor | Aspect2 |
| id_description__idx_2_editor | |
And I change phase in workshop "TestWorkshop" to "Submission phase"
And I log out
# student1 submits
And I am on the "TestWorkshop" "workshop activity" page logged in as student1
And I add a submission in workshop "TestWorkshop" as:"
| Title | Submission1 |
| Submission content | Some content |
And I log out
# student2 submits
And I am on the "TestWorkshop" "workshop activity" page logged in as student2
And I add a submission in workshop "TestWorkshop" as:"
| Title | Submission2 |
| Submission content | Some content |
And I log out
# student3 submits
And I am on the "TestWorkshop" "workshop activity" page logged in as student3
And I add a submission in workshop "TestWorkshop" as:"
| Title | Submission3 |
| Submission content | Some content |
And I log out
# teacher1 allocates reviewers and changes the phase to assessment
And I am on the "TestWorkshop" "workshop activity" page logged in as teacher1
And I allocate submissions in workshop "TestWorkshop" as:"
| Participant | Reviewer |
| Sam1 Student1 | Sam2 Student2 |
| Sam2 Student2 | Sam1 Student1 |
| Sam3 Student3 | Sam1 Student1 |
| Sam2 Student2 | Sam4 Student4 |
And I follow "TestWorkshop"
And I change phase in workshop "TestWorkshop" to "Assessment phase"
And I log out
# student1 assesses work of student2 and student3
And I am on the "TestWorkshop" "workshop activity" page logged in as student1
And I assess submission "Sam2" in workshop "TestWorkshop" as:"
| grade__idx_0 | 5 / 10 |
| peercomment__idx_0 | You can do better |
| grade__idx_1 | 10 / 10 |
| peercomment__idx_1 | Amazing |
| Feedback for the author | Good work |
And I am on "Course1" course homepage
And I assess submission "Sam3" in workshop "TestWorkshop" as:"
| grade__idx_0 | 9 / 10 |
| peercomment__idx_0 | Well done |
| grade__idx_1 | 8 / 10 |
| peercomment__idx_1 | Very good |
| Feedback for the author | No comments |
And I log out
# student2 assesses work of student1
And I am on the "TestWorkshop" "workshop activity" page logged in as student2
And I assess submission "Sam1" in workshop "TestWorkshop" as:"
| grade__idx_0 | 6 / 10 |
| peercomment__idx_0 | |
| grade__idx_1 | 7 / 10 |
| peercomment__idx_1 | |
| Feedback for the author | Keep it up |
And I log out
# teacher1 makes sure he can see all peer grades
And I am on the "TestWorkshop" "workshop activity" page logged in as teacher1
And I click on "//table/tbody/tr[td[contains(concat(' ', normalize-space(@class), ' '), ' participant ') and contains(.,'Sam2')]]/td[contains(concat(' ', normalize-space(@class), ' '), ' receivedgrade ') and contains(.,'Sam1')]/descendant::a[@class='grade']" "xpath_element"
# teacher1 assesses the work on submission1 and assesses the assessment of peer
And I set the following fields to these values:
| Override grade for assessment | 11 |
| Feedback for the reviewer | |
And I press "Save and close"
And I change phase in workshop "TestWorkshop" to "Grading evaluation phase"
And I follow "Submission1"
And I press "Assess"
And I set the following fields to these values:
| grade__idx_0 | 1 / 10 |
| peercomment__idx_0 | Extremely bad |
| grade__idx_1 | 2 / 10 |
| peercomment__idx_1 | Very bad |
| Feedback for the author | Your peers overestimate you |
And I press "Save and close"
And I press "Re-calculate grades"
And I change phase in workshop "TestWorkshop" to "Closed"
And I log out
Scenario: Add and assess submissions in workshop with javascript enabled
And I log in as "student1"
And I am on "Course1" course homepage
And the "Receive a grade" completion condition of "TestWorkshop" is displayed as "done"
And the "Receive a passing grade" completion condition of "TestWorkshop" is displayed as "failed"
And I log out
And I log in as "student2"
And I am on "Course1" course homepage
And the "Receive a grade" completion condition of "TestWorkshop" is displayed as "done"
And the "Receive a passing grade" completion condition of "TestWorkshop" is displayed as "done"
And I log out
And I log in as "student3"
And I am on "Course1" course homepage
And the "Receive a grade" completion condition of "TestWorkshop" is displayed as "done"
And the "Receive a passing grade" completion condition of "TestWorkshop" is displayed as "done"
And I log out
And I log in as "student4"
And I am on "Course1" course homepage
And the "Receive a grade" completion condition of "TestWorkshop" is displayed as "todo"
And the "Receive a passing grade" completion condition of "TestWorkshop" is displayed as "todo"
And I log out
And I log in as "teacher1"
And I am on "Course1" course homepage
And "Sam1 Student1" user has completed "TestWorkshop" activity
And "Sam2 Student2" user has completed "TestWorkshop" activity
And "Sam3 Student3" user has completed "TestWorkshop" activity
And "Sam4 Student4" user has not completed "TestWorkshop" activity