first commit

This commit is contained in:
CHIEFSOFT\ameye
2024-09-30 18:11:26 -04:00
commit e592ca6823
27270 changed files with 5002257 additions and 0 deletions
@@ -0,0 +1,65 @@
@mod @mod_survey @core_completion @javascript
Feature: A teacher can use activity completion to track a student progress
In order to use activity completion
As a teacher
I need to set survey activities and enable activity completion
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist:
| fullname | shortname | category | enablecompletion |
| Course 1 | C1 | 0 | 1 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I enable "survey" "mod" plugin
And I log in as "teacher1"
Scenario: Require survey view
Given the following "activities" exist:
| activity | name | course | idnumber | template | completion | completionview | completionsubmit |
| survey | Test survey name | C1 | survey1 | 5 | 2 | 1 | 0 |
And I am on the "Test survey name" "survey activity" page
# Teacher view.
And "Test survey name" should have the "View" completion condition
# Student view.
When I am on the "Course 1" course page logged in as student1
And the "View" completion condition of "Test survey name" is displayed as "todo"
And I follow "Test survey name"
And I am on "Course 1" course homepage
Then the "View" completion condition of "Test survey name" is displayed as "done"
Scenario: Require survey submission
Given the following "activities" exist:
| activity | name | course | idnumber | template | completion | completionview | completionsubmit |
| survey | Test survey name | C1 | survey1 | 5 | 2 | 1 | 1 |
And I am on the "Test survey name" "survey activity" page
# Teacher view.
And "Test survey name" should have the "Submit answers" completion condition
# Student view.
When I am on the "Course 1" course page logged in as student1
And the "Submit answers" completion condition of "Test survey name" is displayed as "todo"
And I follow "Test survey name"
And the "Submit answers" completion condition of "Test survey name" is displayed as "todo"
And I press "Submit"
And I am on "Course 1" course homepage
And the "Submit answers" completion condition of "Test survey name" is displayed as "done"
And I follow "Test survey name"
And the "Submit answers" completion condition of "Test survey name" is displayed as "done"
Scenario: Use manual completion
Given the following "activities" exist:
| activity | name | course | idnumber | completion |
| survey | Test survey name | C1 | survey1 | 1 |
And I am on "Course 1" course homepage
# Teacher view.
And "Test survey name" should have the "Mark as done" completion condition
# Student view.
When I am on the "survey1" Activity page logged in as student1
Then the manual completion button of "Test survey name" is displayed as "Mark as done"
And I toggle the manual completion state of "Test survey name"
And the manual completion button of "Test survey name" is displayed as "Done"
@@ -0,0 +1,47 @@
@mod @mod_survey @javascript
Feature: A teacher navigates to response reports of students
If survey activity is configured for critical students
Only questions and particiats pages should be visible under response reports
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 1 | student2@example.com |
And the following "courses" exist:
| fullname | shortname | category | enablecompletion |
| Course 1 | C1 | 0 | 1 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
And I enable "survey" "mod" plugin
And the following "activities" exist:
| activity | name | course | idnumber | template |
| survey | Test survey name | C1 | survey1 | 5 |
Scenario: Only questions and participants page should be available under response reports as teacher
Given I am on the "Test survey name" "survey activity" page logged in as student1
And I set the field "At what moment in class were you most engaged as a learner?" to "most engaged as student1"
And I set the field "At what moment in class were you most distanced as a learner?" to "most distanced as student1"
And I set the field "What action from anyone in the forums did you find most affirming or helpful?" to "most helpful student1"
And I set the field "What action from anyone in the forums did you find most puzzling or confusing?" to "most confusing student1"
And I set the field "What event surprised you most?" to "most surprised student1"
And I press "Submit"
And I press "Continue"
And I am on the "Test survey name" "survey activity" page logged in as student2
And I set the field "At what moment in class were you most engaged as a learner?" to "most engaged as student2"
And I set the field "At what moment in class were you most distanced as a learner?" to "most distanced as student2"
And I set the field "What action from anyone in the forums did you find most affirming or helpful?" to "most helpful student2"
And I set the field "What action from anyone in the forums did you find most puzzling or confusing?" to "most confusing student2"
And I set the field "What event surprised you most?" to "most surprised student1"
And I press "Submit"
And I press "Continue"
When I am on the "Test survey name" "survey activity" page logged in as teacher1
And I navigate to "Response reports" in current page administration
Then I should not see "Summary"
And I should not see "Scales"
And I should see "Questions"
And I should see "Participants"
@@ -0,0 +1,31 @@
@mod @mod_survey
Feature: The default introduction is displayed when the activity description is empty
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist:
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
And I enable "survey" "mod" plugin
And the following "activities" exist:
| activity | name | course | idnumber | template |
| survey | Test survey name | C1 | survey1 | 1 |
Scenario: Display the default survey introduction when activity description is empty
Given I am on the "Test survey name" "survey activity" page logged in as "teacher1"
And I should see "Test survey 1"
When I am on the "Test survey name" "survey activity editing" page
And I set the following fields to these values:
| Description | |
And I press "Save and display"
Then I should see "The purpose of this survey is to help us understand"
And I am on the "Test survey name" "survey activity editing" page
And I set the following fields to these values:
| Survey type | ATTLS (20 item version) |
And I press "Save and display"
And I should see "The purpose of this questionnaire is to help us evaluate"
@@ -0,0 +1,86 @@
@mod @mod_survey
Feature: Viewing response reports by group
In order to view reponse reports on a large course
As a teacher
I need to filter the users on the response reports by group
Background:
And the following "courses" exist:
| fullname | shortname |
| Test Course 1 | C1 |
And the following "groups" exist:
| name | course | idnumber | participation |
| Group 1 | C1 | G1 | 1 |
| Group 2 | C1 | G2 | 1 |
| Group 3 | C1 | G3 | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | TeacherG1 | 1 | teacher1@example.com |
| noneditor1 | NoneditorG1 | 1 | noneditor1@example.com |
| noneditor2 | NoneditorNone | 2 | noneditor2@example.com |
| user1 | User1G1 | 1 | user1@example.com |
| user2 | User2G2 | 2 | user2@example.com |
| user3 | User3None | 3 | user3@example.com |
| user4 | User4NPgroup | 4 | user4@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| noneditor1 | C1 | teacher |
| noneditor2 | C1 | teacher |
| user1 | C1 | student |
| user2 | C1 | student |
| user3 | C1 | student |
| user4 | C1 | student |
And the following "group members" exist:
| user | group |
| teacher1 | G1 |
| noneditor1 | G1 |
| user1 | G1 |
| user2 | G2 |
| user4 | G3 |
And I enable "survey" "mod" plugin
And the following "activities" exist:
| activity | name | intro | course | idnumber | groupmode | template |
| survey | Separate survey | survey with separate groups | C1 | survey1 | 1 | 5 |
| survey | Visible survey | survey with visible groups | C1 | survey2 | 2 | 5 |
And I am on the "Separate survey" "survey activity" page logged in as user1
And I press "Submit"
And I am on the "Separate survey" "survey activity" page logged in as user2
And I press "Submit"
And I am on the "Separate survey" "survey activity" page logged in as user3
And I press "Submit"
And I am on the "Separate survey" "survey activity" page logged in as user4
And I press "Submit"
And I am on the "Visible survey" "survey activity" page logged in as user1
And I press "Submit"
And I am on the "Visible survey" "survey activity" page logged in as user2
And I press "Submit"
And I am on the "Visible survey" "survey activity" page logged in as user3
And I press "Submit"
And I am on the "Visible survey" "survey activity" page logged in as user4
And I press "Submit"
Scenario Outline: Editing teachers should see all groups on the Results page. Non-editing teachers should see just their own
groups in Separate groups mode, all groups in Visible groups mode.
Given I am on the "<survey>" "survey activity" page logged in as "<user>"
And I follow "Response reports"
Then I <all> see "All participants"
And I <G1> see "Group 1"
And I <G2> see "Group 2"
And I should not see "Group 3"
And I <user1> see "User1G1"
And I <user2> see "User2G2"
And I <user3> see "User3None"
And I <user4> see "User4NPgroup"
Examples:
| survey | user | all | G1 | G2 | user1 | user2 | user3 | user4 |
| survey1 | teacher1 | should | should | should | should | should | should | should |
| survey1 | noneditor1 | should not | should | should not | should | should not | should not | should not |
| survey2 | teacher1 | should | should | should | should | should | should | should |
| survey2 | noneditor1 | should | should | should | should | should not | should not | should not |
| survey2 | noneditor2 | should | should | should | should | should not | should not | should not |
Scenario: Non-editing teacher without access to any groups should not see survey results in separate groups mode
Given I am on the "survey1" "survey activity" page logged in as "noneditor2"
Then I should not see "Response reports"
@@ -0,0 +1,48 @@
@mod @mod_survey
Feature: A teacher can set three types of survey activity
In order to use verified survey instruments
As a teacher
I need to set survey activities and select which survey type suits my needs
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist:
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
And I enable "survey" "mod" plugin
And I log in as "teacher1"
Scenario: Switching between the three survey types
Given the following "activities" exist:
| activity | name | course | idnumber |
| survey | Test survey name | C1 | survey1 |
And I am on the "Test survey name" "survey activity editing" page
And I set the following fields to these values:
| Survey type | ATTLS (20 item version) |
And I press "Save and display"
Then I should see "Attitudes Towards Thinking and Learning"
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Survey type | Critical incidents |
And I press "Save and display"
And I should see "At what moment in class were you most engaged as a learner?"
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Survey type | COLLES (Preferred and Actual) |
And I press "Save and display"
And I should see "In this online unit..."
And I should see "my learning focuses on issues that interest me."
Scenario: Survey activity is created via UI
Given I add a survey activity to course "Course 1" section "1"
And I set the following fields to these values:
| Name | Test survey name |
| Description | Test survey description |
| Survey type | ATTLS (20 item version) |
When I press "Save and return to course"
Then I should see "Test survey name"
@@ -0,0 +1,25 @@
@mod @mod_survey @javascript
Feature: When some answers are not selected, the survey should not be submitted
In order to submit valid responses
As a student
I need to fill values
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist:
| fullname | shortname |
| Course 1 | C1 |
And the following "course enrolments" exist:
| user | course | role |
| student1 | C1 | student |
And I enable "survey" "mod" plugin
Scenario: Require survey view
Given the following "activities" exist:
| activity | name | course |
| survey | Test survey name | C1 |
And I am on the "Test survey name" "survey activity" page logged in as "student1"
When I press "Submit"
Then I should see "Some of the multiple choice questions have not been answered." in the "Error" "dialogue"