1 |
efrain |
1 |
@block @block_completion_progress @javascript
|
|
|
2 |
Feature: Using Completion Progress block overview
|
|
|
3 |
In order to see full class progress
|
|
|
4 |
As a teacher
|
|
|
5 |
I can view the overview page
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname | email |
|
|
|
10 |
| student1 | Student | 1 | student1@example.com |
|
|
|
11 |
| student2 | Student | 2 | student2@example.com |
|
|
|
12 |
| student3 | Student | 3 | student3@example.com |
|
|
|
13 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
|
|
14 |
| teacher2 | Teacher | 2 | teacher2@example.com |
|
|
|
15 |
And the following config values are set as admin:
|
|
|
16 |
| enablecompletion | 1 |
|
|
|
17 |
| enableavailability | 1 |
|
|
|
18 |
| enablenotes | 1 |
|
|
|
19 |
| messaging | 1 |
|
|
|
20 |
And the following "courses" exist:
|
|
|
21 |
| fullname | shortname | category | enablecompletion |
|
|
|
22 |
| Course 1 | C1 | 0 | 1 |
|
|
|
23 |
And the following "course enrolments" exist:
|
|
|
24 |
| user | course | role |
|
|
|
25 |
| student1 | C1 | student |
|
|
|
26 |
| student2 | C1 | student |
|
|
|
27 |
| student3 | C1 | student |
|
|
|
28 |
| teacher1 | C1 | editingteacher |
|
|
|
29 |
| teacher2 | C1 | teacher |
|
|
|
30 |
And the following "groups" exist:
|
|
|
31 |
| name | course | idnumber |
|
|
|
32 |
| Group 1 | C1 | G1 |
|
|
|
33 |
| Group 2 | C1 | G2 |
|
|
|
34 |
And the following "group members" exist:
|
|
|
35 |
| user | group |
|
|
|
36 |
| student1 | G1 |
|
|
|
37 |
| student2 | G2 |
|
|
|
38 |
| teacher2 | G1 |
|
|
|
39 |
| teacher2 | G2 |
|
|
|
40 |
# 2 = Show activity as complete when conditions are met.
|
|
|
41 |
And the following "activities" exist:
|
|
|
42 |
| activity | course | idnumber | name | timeclose | enablecompletion | completionview | completion |
|
|
|
43 |
| quiz | C1 | Q1A | Quiz 1A No deadline | 0 | 1 | 1 | 2 |
|
|
|
44 |
| quiz | C1 | Q1B | Quiz 1B Past deadline | 1337 | 1 | 0 | 0 |
|
|
|
45 |
| quiz | C1 | Q1C | Quiz 1C Future deadline | 9000000000 | 1 | 0 | 0 |
|
|
|
46 |
And the following "question categories" exist:
|
|
|
47 |
| contextlevel | reference | name |
|
|
|
48 |
| Course | C1 | Test questions |
|
|
|
49 |
And the following "questions" exist:
|
|
|
50 |
| qtype | name | questiontext | questioncategory |
|
|
|
51 |
| truefalse | First question | Answer the first question | Test questions |
|
|
|
52 |
And quiz "Quiz 1A No deadline" contains the following questions:
|
|
|
53 |
| question | page |
|
|
|
54 |
| First question | 1 |
|
|
|
55 |
And quiz "Quiz 1B Past deadline" contains the following questions:
|
|
|
56 |
| question | page |
|
|
|
57 |
| First question | 1 |
|
|
|
58 |
And quiz "Quiz 1C Future deadline" contains the following questions:
|
|
|
59 |
| question | page |
|
|
|
60 |
| First question | 1 |
|
|
|
61 |
Given I log in as "teacher1"
|
|
|
62 |
And I am on "Course 1" course homepage with editing mode on
|
|
|
63 |
And I add the "Completion Progress" block
|
|
|
64 |
And I log out
|
|
|
65 |
|
|
|
66 |
Scenario: Editing teacher sees all members by default
|
|
|
67 |
Given I log in as "teacher1"
|
|
|
68 |
And I am on "Course 1" course homepage
|
|
|
69 |
When I click on "Overview of students" "button" in the "Completion Progress" "block"
|
|
|
70 |
Then I should see "Student 1"
|
|
|
71 |
And I should see "Student 2"
|
|
|
72 |
And I should see "Student 3"
|
|
|
73 |
|
|
|
74 |
Scenario: Non-editing teacher sees their group members by default
|
|
|
75 |
Given I log in as "teacher2"
|
|
|
76 |
And I am on "Course 1" course homepage
|
|
|
77 |
When I click on "Overview of students" "button" in the "Completion Progress" "block"
|
|
|
78 |
Then I should see "Student 1"
|
|
|
79 |
And I should see "Student 2"
|
|
|
80 |
And I should not see "Student 3"
|
|
|
81 |
|
|
|
82 |
Scenario: Select all selects all
|
|
|
83 |
Given I log in as "teacher1"
|
|
|
84 |
And I am on "Course 1" course homepage
|
|
|
85 |
And I click on "Overview of students" "button" in the "Completion Progress" "block"
|
|
|
86 |
When I click on "Select all" "checkbox"
|
|
|
87 |
Then the following fields match these values:
|
|
|
88 |
| Select 'Student 1' | Yes |
|
|
|
89 |
| Select 'Student 2' | Yes |
|
|
|
90 |
| Select 'Student 3' | Yes |
|
|
|
91 |
|
|
|
92 |
Scenario: Messaging works
|
|
|
93 |
Given I log in as "teacher1"
|
|
|
94 |
And I am on "Course 1" course homepage
|
|
|
95 |
And I click on "Overview of students" "button" in the "Completion Progress" "block"
|
|
|
96 |
When I click on "Select 'Student 1'" "checkbox"
|
|
|
97 |
And I click on "Select 'Student 2'" "checkbox"
|
|
|
98 |
And I select "Send a message" from the "With selected users..." singleselect
|
|
|
99 |
And I set the field "Message" to "Message"
|
|
|
100 |
And I click on "Send message to 2 people" "button"
|
|
|
101 |
Then I should see "Message sent to 2 people"
|
|
|
102 |
|
|
|
103 |
Scenario: Notes work
|
|
|
104 |
Given I log in as "teacher1"
|
|
|
105 |
And I am on "Course 1" course homepage
|
|
|
106 |
And I click on "Overview of students" "button" in the "Completion Progress" "block"
|
|
|
107 |
When I click on "Select 'Student 1'" "checkbox"
|
|
|
108 |
And I click on "Select 'Student 2'" "checkbox"
|
|
|
109 |
And I select "Add a new note" from the "With selected users..." singleselect
|
|
|
110 |
And I set the field "Note" to "Note"
|
|
|
111 |
And I click on "Add a new note to 2 people" "button"
|
|
|
112 |
Then I should see "Note added to 2 people"
|