1 |
efrain |
1 |
@mod @mod_lesson
|
|
|
2 |
Feature: In a lesson activity, a non editing teacher can grade essay questions
|
|
|
3 |
As a non editing teacher
|
|
|
4 |
I need to grade student answers to essay questions in lesson
|
|
|
5 |
|
|
|
6 |
Scenario: non editing teacher grade essay questions
|
|
|
7 |
Given the following "users" exist:
|
|
|
8 |
| username | firstname | lastname | email |
|
|
|
9 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
|
|
10 |
| teacher2 | Teacher | 2 | teacher2@example.com |
|
|
|
11 |
| student1 | Student | 1 | student1@example.com |
|
|
|
12 |
| student2 | Student | 2 | student2@example.com |
|
|
|
13 |
| student3 | Student | 3 | student3@example.com |
|
|
|
14 |
| student4 | Student | 4 | student4@example.com |
|
|
|
15 |
| student5 | Student | 5 | student5@example.com |
|
|
|
16 |
And the following "courses" exist:
|
|
|
17 |
| fullname | shortname | category |
|
|
|
18 |
| Course 1 | C1 | 0 |
|
|
|
19 |
And the following "course enrolments" exist:
|
|
|
20 |
| user | course | role |
|
|
|
21 |
| teacher1 | C1 | editingteacher |
|
|
|
22 |
| teacher2 | C1 | teacher |
|
|
|
23 |
| student1 | C1 | student |
|
|
|
24 |
| student2 | C1 | student |
|
|
|
25 |
| student3 | C1 | student |
|
|
|
26 |
| student4 | C1 | student |
|
|
|
27 |
| student5 | C1 | student |
|
|
|
28 |
And the following "groups" exist:
|
|
|
29 |
| name | course | idnumber | participation |
|
|
|
30 |
| Group A | C1 | G1 | 1 |
|
|
|
31 |
| Group B | C1 | G2 | 1 |
|
|
|
32 |
| Group C | C1 | G3 | 1 |
|
|
|
33 |
| Group D | C1 | G4 | 0 |
|
|
|
34 |
And the following "group members" exist:
|
|
|
35 |
| user | group |
|
|
|
36 |
| teacher1 | G1 |
|
|
|
37 |
| teacher2 | G2 |
|
|
|
38 |
| student1 | G1 |
|
|
|
39 |
| student2 | G2 |
|
|
|
40 |
| student3 | G3 |
|
|
|
41 |
| student4 | G4 |
|
|
|
42 |
And the following "activities" exist:
|
|
|
43 |
| activity | name | course | idnumber |
|
|
|
44 |
| lesson | Test lesson name | C1 | lesson1 |
|
|
|
45 |
And the following "mod_lesson > page" exist:
|
|
|
46 |
| lesson | qtype | title | content |
|
|
|
47 |
| Test lesson name | essay | Essay question | <p>Please write a story about a <b>frog</b>.</p> |
|
|
|
48 |
And the following "mod_lesson > answer" exist:
|
|
|
49 |
| page | jumpto | score |
|
|
|
50 |
| Essay question | Next page | 1 |
|
|
|
51 |
And I am on the "Test lesson name" "lesson activity editing" page logged in as teacher1
|
|
|
52 |
And I set the following fields to these values:
|
|
|
53 |
| Group mode | Separate groups |
|
|
|
54 |
And I press "Save and display"
|
|
|
55 |
And I am on the "Test lesson name" "lesson activity" page logged in as student1
|
|
|
56 |
And I set the field "Your answer" to "<p>Once upon a time there was a little green frog."
|
|
|
57 |
And I press "Submit"
|
|
|
58 |
And I am on the "Test lesson name" "lesson activity" page logged in as student2
|
|
|
59 |
And I set the field "Your answer" to "<p>Once upon a time there were two little green frogs."
|
|
|
60 |
And I press "Submit"
|
|
|
61 |
And I am on the "Test lesson name" "lesson activity" page logged in as student4
|
|
|
62 |
And I set the field "Your answer" to "<p>Once upon a time there were four little green frogs."
|
|
|
63 |
And I press "Submit"
|
|
|
64 |
And I am on the "Test lesson name" "lesson activity" page logged in as student5
|
|
|
65 |
And I set the field "Your answer" to "<p>Once upon a time there were five little green frogs."
|
|
|
66 |
And I press "Submit"
|
|
|
67 |
When I am on the "Test lesson name" "lesson activity" page logged in as teacher1
|
|
|
68 |
Then I should see "Grade essays"
|
|
|
69 |
And I grade lesson essays
|
|
|
70 |
And I should see "Student 1"
|
|
|
71 |
And I should see "Student 2"
|
|
|
72 |
And I should see "Student 4"
|
|
|
73 |
And I should see "Student 5"
|
|
|
74 |
And I should see "Essay question"
|
|
|
75 |
And I click on "Essay question" "link" in the "Student 1" "table_row"
|
|
|
76 |
And I should see "Student 1's response"
|
|
|
77 |
And I should see "Once upon a time there was a little green frog."
|
|
|
78 |
And I set the following fields to these values:
|
|
|
79 |
| Your comments | Well done. |
|
|
|
80 |
| Essay score | 1 |
|
|
|
81 |
And I press "Save changes"
|
|
|
82 |
And I should see "Changes saved"
|
|
|
83 |
And I select "Group A" from the "Separate groups" singleselect
|
|
|
84 |
And I should see "Student 1"
|
|
|
85 |
And I should not see "Student 2"
|
|
|
86 |
And I should not see "Student 4"
|
|
|
87 |
And I should not see "Student 5"
|
|
|
88 |
And I select "Group B" from the "Separate groups" singleselect
|
|
|
89 |
And I should see "Student 2"
|
|
|
90 |
And I should not see "Student 1"
|
|
|
91 |
And I should not see "Student 4"
|
|
|
92 |
And I should not see "Student 5"
|
|
|
93 |
And I select "Group C" from the "Separate groups" singleselect
|
|
|
94 |
And I should see "No one in Group C has answered an essay question yet."
|
|
|
95 |
And I should not see "Group D" in the "Separate groups" "select"
|
|
|
96 |
And I am on the "Test lesson name" "lesson activity" page logged in as teacher2
|
|
|
97 |
Then I should see "Grade essays"
|
|
|
98 |
And I grade lesson essays
|
|
|
99 |
And I should not see "Student 1"
|
|
|
100 |
And I should see "Student 2"
|
|
|
101 |
And I should not see "Student 4"
|
|
|
102 |
And I should not see "Student 5"
|