Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_lesson
2
Feature: Teachers can review student progress on all lessons in a course by viewing the complete report
3
  As a Teacher
4
  I need to view the complete report for one of my students.
5
 
6
  Background:
7
    Given the following "users" exist:
8
      | username | firstname | lastname | email |
9
      | teacher1 | Teacher | 1 | teacher1@example.com |
10
      | student1 | Student | 1 | student1@example.com |
11
    And the following "courses" exist:
12
      | fullname | shortname | category |
13
      | Course 1 | C1 | 0 |
14
    And the following "course enrolments" exist:
15
      | user | course | role |
16
      | teacher1 | C1 | editingteacher |
17
      | student1 | C1 | student |
18
    And the following "activities" exist:
19
      | activity   | name             | course | idnumber    | retake |
20
      | lesson     | Test lesson name | C1     | lesson1     | 1      |
21
 
22
  Scenario: View student progress for lesson that was never attempted
23
    Given the following "mod_lesson > pages" exist:
24
      | lesson           | qtype     | title                 | content                   |
25
      | Test lesson name | content   | First page name       | First page contents       |
26
      | Test lesson name | truefalse | True/false question 1 | Paper is made from trees. |
27
    And the following "mod_lesson > answers" exist:
28
      | page                  | answer    | response | jumpto    | score |
29
      | First page name       | Next page |          | Next page | 0     |
30
      | True/false question 1 | True      | Correct  | Next page | 1     |
31
      | True/false question 1 | False     | Wrong    | This page | 0     |
32
    And I log in as "teacher1"
33
    When I am on "Course 1" course homepage
34
    And I navigate to course participants
35
    And I follow "Student 1"
36
    And I follow "Complete report"
37
    Then I should see "No attempts have been made on this lesson"
38
 
39
  Scenario: View student progress for an incomplete lesson containing both content and question pages
40
    Given the following "mod_lesson > pages" exist:
41
      | lesson           | qtype     | title                 | content                   |
42
      | Test lesson name | content   | First page name       | First page contents       |
43
      | Test lesson name | content   | Second page name      | Second page contents      |
44
      | Test lesson name | truefalse | True/false question 1 | Paper is made from trees. |
45
    And the following "mod_lesson > answers" exist:
46
      | page                  | answer    | response | jumpto    | score |
47
      | First page name       | Next page |          | Next page | 0     |
48
      | Second page name      | Next page |          | Next page | 0     |
49
      | True/false question 1 | True      | Correct  | Next page | 1     |
50
      | True/false question 1 | False     | Wrong    | This page | 0     |
51
    When I am on the "Test lesson name" "lesson activity" page logged in as student1
52
    And I should see "First page contents"
53
    And I press "Next page"
54
    Then I am on the "Course 1" course page logged in as teacher1
55
    And I navigate to course participants
56
    And I follow "Student 1"
57
    And I follow "Complete report"
58
    And I should see "Lesson has been started, but not yet completed"
59
    And I should see "1" in the ".cell.c1" "css_element"
60
    And I should see "0" in the ".cell.c2" "css_element"
61
 
62
  Scenario: View student progress for a lesson containing both content and question pages
63
    Given the following "mod_lesson > pages" exist:
64
      | lesson           | qtype     | title                 | content                   |
65
      | Test lesson name | content   | First page name       | First page contents       |
66
      | Test lesson name | content   | Second page name      | Second page contents      |
67
      | Test lesson name | truefalse | True/false question 1 | Paper is made from trees. |
68
      | Test lesson name | truefalse | True/false question 2 | The sky is Pink.          |
69
    And the following "mod_lesson > answers" exist:
70
      | page                  | answer        | response | jumpto        | score |
71
      | First page name       | Next page     |          | Next page     | 0     |
72
      | Second page name      | Previous page |          | Previous page | 0     |
73
      | Second page name      | Next page     |          | Next page     | 0     |
74
      | True/false question 1 | True          | Correct  | Next page     | 1     |
75
      | True/false question 1 | False         | Wrong    | This page     | 0     |
76
      | True/false question 2 | False         | Correct  | Next page     | 1     |
77
      | True/false question 2 | True          | Wrong    | This page     | 0     |
78
    When I am on the "Test lesson name" "lesson activity" page logged in as student1
79
    And I should see "First page contents"
80
    And I press "Next page"
81
    And I should see "Second page contents"
82
    And I press "Next page"
83
    And I should see "Paper is made from trees."
84
    And I set the following fields to these values:
85
      | True | 1 |
86
    And I press "Submit"
87
    And I press "Continue"
88
    And I should see "The sky is Pink."
89
    And I set the following fields to these values:
90
      | True | 1 |
91
    And I press "Submit"
92
    And I press "Continue"
93
    And I should see "Congratulations - end of lesson reached"
94
    Then I am on the "Course 1" course page logged in as teacher1
95
    And I navigate to course participants
96
    And I follow "Student 1"
97
    And I follow "Complete report"
98
    And I should see "Grade: 50.00 / 100.00"
99
    And I should see "4" in the ".cell.c1" "css_element"
100
    And I should see "2" in the ".cell.c2" "css_element"
101
    And I should see "1" in the ".cell.c3" "css_element"
102
 
103
  Scenario: View student attempts in a lesson containing only content pages
104
    Given the following "mod_lesson > pages" exist:
105
      | lesson           | qtype     | title            | content              |
106
      | Test lesson name | content   | First page name  | First page contents  |
107
      | Test lesson name | content   | Second page name | Second page contents |
108
    And the following "mod_lesson > answers" exist:
109
      | page                  | answer        | jumpto        |
110
      | First page name       | Next page     | Next page     |
111
      | Second page name      | Previous page | Previous page |
112
      | Second page name      | End of lesson | End of lesson |
113
    When I am on the "Test lesson name" "lesson activity" page logged in as student1
114
    And I should see "First page contents"
115
    And I press "Next page"
116
    And I should see "Second page contents"
117
    And I press "End of lesson"
118
    Then I am on the "Course 1" course page logged in as teacher1
119
    And I navigate to course participants
120
    And I follow "Student 1"
121
    And I follow "Complete report"
122
    And I should see "Completed"
123
    And I should see "2" in the ".cell.c1" "css_element"
124
    And I should see "0" in the ".cell.c2" "css_element"
125
    And I should see "0" in the ".cell.c3" "css_element"