1 |
efrain |
1 |
@mod @mod_lesson
|
|
|
2 |
Feature: In a lesson activity, teachers can review student attempts
|
|
|
3 |
To review student attempts in a lesson
|
|
|
4 |
As a Teacher
|
|
|
5 |
I need to view the reports.
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname | email |
|
|
|
10 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
|
|
11 |
| student1 | Student | 1 | student1@example.com |
|
|
|
12 |
And the following "courses" exist:
|
|
|
13 |
| fullname | shortname | category |
|
|
|
14 |
| Course 1 | C1 | 0 |
|
|
|
15 |
And the following "course enrolments" exist:
|
|
|
16 |
| user | course | role |
|
|
|
17 |
| teacher1 | C1 | editingteacher |
|
|
|
18 |
| student1 | C1 | student |
|
|
|
19 |
And the following "activities" exist:
|
|
|
20 |
| activity | name | course | idnumber | retake |
|
|
|
21 |
| lesson | Test lesson name | C1 | lesson1 | 1 |
|
|
|
22 |
|
|
|
23 |
Scenario: View student attempts in a lesson containing both content and question pages
|
|
|
24 |
Given the following "mod_lesson > pages" exist:
|
|
|
25 |
| lesson | qtype | title | content |
|
|
|
26 |
| Test lesson name | content | First page name | First page contents |
|
|
|
27 |
| Test lesson name | content | Second page name | Second page contents |
|
|
|
28 |
| Test lesson name | content | Third page name | Third page contents |
|
|
|
29 |
| Test lesson name | truefalse | True/false question 1 | Paper is made from trees. |
|
|
|
30 |
| Test lesson name | truefalse | True/false question 2 | Kermit is a frog |
|
|
|
31 |
And the following "mod_lesson > answers" exist:
|
|
|
32 |
| page | answer | response | jumpto | score |
|
|
|
33 |
| First page name | Next page | | Next page | 0 |
|
|
|
34 |
| Second page name | Previous page | | Previous page | 0 |
|
|
|
35 |
| Second page name | Next page | | Next page | 0 |
|
|
|
36 |
| Third page name | Previous page | | Previous page | 0 |
|
|
|
37 |
| Third page name | Next page | | Next page | 0 |
|
|
|
38 |
| True/false question 1 | True | Correct | Next page | 1 |
|
|
|
39 |
| True/false question 1 | False | Wrong | This page | 0 |
|
|
|
40 |
| True/false question 2 | True | Correct | Next page | 1 |
|
|
|
41 |
| True/false question 2 | False | Wrong | This page | 0 |
|
|
|
42 |
When I am on the "Test lesson name" "lesson activity" page logged in as student1
|
|
|
43 |
And I should see "First page contents"
|
|
|
44 |
And I press "Next page"
|
|
|
45 |
And I should see "Second page contents"
|
|
|
46 |
And I press "Next page"
|
|
|
47 |
And I should see "Third page contents"
|
|
|
48 |
And I press "Next page"
|
|
|
49 |
And I should see "Paper is made from trees."
|
|
|
50 |
And I set the following fields to these values:
|
|
|
51 |
| True | 1 |
|
|
|
52 |
And I press "Submit"
|
|
|
53 |
And I press "Continue"
|
|
|
54 |
And I should see "Kermit is a frog"
|
|
|
55 |
And I set the following fields to these values:
|
|
|
56 |
| True | 1 |
|
|
|
57 |
And I press "Submit"
|
|
|
58 |
And I press "Continue"
|
|
|
59 |
And I should see "Congratulations - end of lesson reached"
|
|
|
60 |
Then I am on the "Test lesson name" "lesson activity" page logged in as teacher1
|
|
|
61 |
And I navigate to "Reports" in current page administration
|
|
|
62 |
And I should see "Student 1"
|
|
|
63 |
And I should see "100%"
|
|
|
64 |
And I should see "High score"
|
|
|
65 |
And I should see "Average score"
|
|
|
66 |
And I should see "Low score"
|
|
|
67 |
|
|
|
68 |
Scenario: View student attempts in a lesson containing only content pages
|
|
|
69 |
Given the following "mod_lesson > pages" exist:
|
|
|
70 |
| lesson | qtype | title | content |
|
|
|
71 |
| Test lesson name | content | First page name | First page contents |
|
|
|
72 |
| Test lesson name | content | Second page name | Second page contents |
|
|
|
73 |
| Test lesson name | content | Third page name | Third page contents |
|
|
|
74 |
| Test lesson name | content | Fourth page name | Fourth page contents |
|
|
|
75 |
And the following "mod_lesson > answers" exist:
|
|
|
76 |
| page | answer | jumpto |
|
|
|
77 |
| First page name | Next page | Next page |
|
|
|
78 |
| Second page name | Previous page | Previous page |
|
|
|
79 |
| Second page name | Next page | Next page |
|
|
|
80 |
| Third page name | Previous page | Previous page |
|
|
|
81 |
| Third page name | Next page | Next page |
|
|
|
82 |
| Fourth page name | Previous page | Previous page |
|
|
|
83 |
| Fourth page name | End of lesson | End of lesson |
|
|
|
84 |
When I am on the "Test lesson name" "lesson activity" page logged in as student1
|
|
|
85 |
And I should see "First page contents"
|
|
|
86 |
And I press "Next page"
|
|
|
87 |
And I should see "Second page contents"
|
|
|
88 |
And I press "Next page"
|
|
|
89 |
And I should see "Third page contents"
|
|
|
90 |
And I press "Next page"
|
|
|
91 |
And I should see "Fourth page contents"
|
|
|
92 |
And I press "End of lesson"
|
|
|
93 |
Then I am on the "Test lesson name" "lesson activity" page logged in as teacher1
|
|
|
94 |
And I navigate to "Reports" in current page administration
|
|
|
95 |
And I should see "Student 1"
|
|
|
96 |
And I should not see "High score"
|
|
|
97 |
And I should not see "Average score"
|
|
|
98 |
And I should not see "Low score"
|