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: In Dashboard, teacher can see the number of student attempts to lessons
3
  In order to know the number of student attempts to a lesson
4
  As a teacher
5
  I need to see it in Dashboard
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
      | student2 | Student | 2 | student2@example.com |
13
    And the following "courses" exist:
14
      | fullname | shortname | category |
15
      | Course 1 | C1 | 0 |
16
    And the following "course enrolments" exist:
17
      | user | course | role |
18
      | teacher1 | C1 | editingteacher |
19
      | student1 | C1 | student |
20
      | student2 | C1 | student |
21
    And I log in as "teacher1"
22
 
23
  Scenario: number of student attempts
24
    Given the following "activity" exists:
25
      | activity | lesson                  |
26
      | course   | C1                      |
27
      | idnumber | 0001                    |
28
      | name     | Test lesson name        |
29
      | retake   | 1                       |
30
    And the following "mod_lesson > pages" exist:
31
      | lesson           | qtype     | title                 | content                   |
32
      | Test lesson name | truefalse | True/false question 1 | Cat is an amphibian       |
33
      | Test lesson name | truefalse | True/false question 2 | Paper is made from trees. |
34
      | Test lesson name | truefalse | True/false question 3 | 1+1=2                     |
35
    And the following "mod_lesson > answers" exist:
36
      | page                  | answer | response | jumpto        | score |
37
      | True/false question 1 | False  | Correct  | Next page     | 1     |
38
      | True/false question 1 | True   | Wrong    | This page     | 0     |
39
      | True/false question 2 | True   | Correct  | Next page     | 1     |
40
      | True/false question 2 | False  | Wrong    | This page     | 0     |
41
      | True/false question 3 | True   | Correct  | Next page     | 1     |
42
      | True/false question 3 | False  | Wrong    | This page     | 0     |
43
    And I am on the "Test lesson name" "lesson activity editing" page
44
    And I expand all fieldsets
45
    And I set the following fields to these values:
46
      | id_deadline_enabled | 1 |
47
      | deadline[day] | 1 |
48
      | deadline[month] | January |
49
      | deadline[year] | 2030 |
50
      | deadline[hour] | 08 |
51
      | deadline[minute] | 00 |
52
    And I press "Save and display"
53
    When I am on the "Test lesson name" "lesson activity" page logged in as student1
54
    And I should see "Cat is an amphibian"
55
    And I set the following fields to these values:
56
      | False | 1 |
57
    And I press "Submit"
58
    And I press "Continue"
59
    And I should see "Paper is made from trees."
60
    And I set the following fields to these values:
61
      | False | 1 |
62
    And I press "Submit"
63
    And I press "Continue"
64
    And I should see "1+1=2"
65
    And I set the following fields to these values:
66
      | False | 1 |
67
    And I press "Submit"
68
    And I press "Continue"
69
    And I should see "Congratulations - end of lesson reached"
70
    And I should see "Your score is 1 (out of 3)."
71
    And I follow "Return to Course 1"
72
    And I follow "Test lesson name"
73
    And I should see "Cat is an amphibian"
74
    And I set the following fields to these values:
75
      | False | 1 |
76
    And I press "Submit"
77
    And I press "Continue"
78
    And I should see "Paper is made from trees."
79
    And I set the following fields to these values:
80
      | True | 1 |
81
    And I press "Submit"
82
    And I press "Continue"
83
    And I should see "1+1=2"
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 "Congratulations - end of lesson reached"
89
    And I should see "Your score is 3 (out of 3)."
90
    And I log out
91
    And I am on the "Test lesson name" "lesson activity" page logged in as student2
92
    And I should see "Cat is an amphibian"
93
    And I set the following fields to these values:
94
      | True | 1 |
95
    And I press "Submit"
96
    And I press "Continue"
97
    And I should see "Paper is made from trees."
98
    And I set the following fields to these values:
99
      | True | 1 |
100
    And I press "Submit"
101
    And I press "Continue"
102
    And I should see "1+1=2"
103
    And I set the following fields to these values:
104
      | True | 1 |
105
    And I press "Submit"
106
    And I press "Continue"
107
    And I should see "Congratulations - end of lesson reached"
108
    And I should see "Your score is 2 (out of 3)."