Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_data @core_completion
2
Feature: Completion pass grade
3
  View activity completion in the database activity
4
  In order to have visibility of database completion requirements
5
  As a student
6
  I need to be able to view my database completion progress
7
 
8
  Background:
9
    Given the following "users" exist:
10
      | username | firstname | lastname | email                |
11
      | student1 | Vinnie    | Student1 | student1@example.com |
12
      | student2 | Vinnie    | Student2 | student2@example.com |
13
      | teacher1 | Darrell   | Teacher1 | teacher1@example.com |
14
    And the following "courses" exist:
15
      | fullname | shortname | category | enablecompletion |
16
      | Course 1 | C1        | 0        | 1                |
17
    And the following "course enrolments" exist:
18
      | user     | course | role           |
19
      | student1 | C1     | student        |
20
      | student2 | C1     | student        |
21
      | teacher1 | C1     | editingteacher |
22
    And the following "activity" exists:
23
      | activity | data          |
24
      | course   | C1            |
25
      | idnumber | mh1           |
26
      | name     | Music history |
27
      | section  | 1             |
28
    And the following "mod_data > fields" exist:
29
      | database | type | name             |
30
      | mh1      | text | Instrument types |
31
    And I am on the "Music history" "data activity" page logged in as teacher1
32
    And I navigate to "Settings" in current page administration
33
    And I expand all fieldsets
34
    And I set the following fields to these values:
35
      | Aggregate type           | Average of ratings                                |
36
      | scale[modgrade_type]     | Point                                             |
37
      | scale[modgrade_point]    | 100                                               |
38
      | gradepass                | 50                                                |
39
      | Add requirements         | 1                                                 |
40
      | View the activity        | 1                                                 |
41
      | Receive a grade          | 1                                                 |
42
      | Passing grade            | 1                                                 |
43
      | completionentriesenabled | 1                                                 |
44
      | completionentries        | 2                                                 |
45
    And I press "Save and display"
46
    And I log out
47
 
48
  @javascript
49
  Scenario: View automatic completion items as a teacher
50
#   We add an entry to let the user change to a different view.
51
    Given the following "mod_data > entries" exist:
52
      | database | user     | Instrument types |
53
      | mh1      | teacher1 | Drums            |
54
    When I am on the "Music history" "data activity" page logged in as teacher1
55
    Then "Music history" should have the "View" completion condition
56
    And "Music history" should have the "Make entries: 2" completion condition
57
    And "Music history" should have the "Receive a grade" completion condition
58
    And "Music history" should have the "Receive a passing grade" completion condition
59
    And I select "Single view" from the "jump" singleselect
60
    And "Music history" should have the "View" completion condition
61
    And "Music history" should have the "Make entries: 2" completion condition
62
    And "Music history" should have the "Receive a grade" completion condition
63
    And "Music history" should have the "Receive a passing grade" completion condition
64
 
65
  @javascript
66
  Scenario: View automatic completion items as a failing student
67
    Given I am on the "Music history" "data activity" page logged in as student1
68
    And the "View" completion condition of "Music history" is displayed as "done"
69
    And the "Make entries: 2" completion condition of "Music history" is displayed as "todo"
70
    And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
71
    And the "Receive a passing grade" completion condition of "Music history" is displayed as "todo"
72
    And the following "mod_data > entries" exist:
73
      | database | user     | Instrument types |
74
      | mh1      | student1 | Drums            |
75
    And I am on "Course 1" course homepage
76
    # One entry is not enough to mark as complete.
77
    And the "View" completion condition of "Music history" is displayed as "done"
78
    And the "Make entries: 2" completion condition of "Music history" is displayed as "todo"
79
    And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
80
    And the "Receive a passing grade" completion condition of "Music history" is displayed as "todo"
81
    And the following "mod_data > entries" exist:
82
      | database | user     | Instrument types |
83
      | mh1      | student1 | Hurdygurdy       |
84
    And I am on "Course 1" course homepage
85
    Then the "View" completion condition of "Music history" is displayed as "done"
86
    And the "Make entries: 2" completion condition of "Music history" is displayed as "done"
87
    And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
88
    And the "Receive a passing grade" completion condition of "Music history" is displayed as "todo"
89
    And I log out
90
    And I am on the "Music history" "data activity" page logged in as teacher1
91
    And I select "Single view" from the "jump" singleselect
92
    And I set the field "rating" to "3"
93
    And I log out
94
    When I am on the "Music history" "data activity" page logged in as student1
95
    Then the "View" completion condition of "Music history" is displayed as "done"
96
    And the "Make entries: 2" completion condition of "Music history" is displayed as "done"
97
    And the "Receive a grade" completion condition of "Music history" is displayed as "done"
98
    And the "Receive a passing grade" completion condition of "Music history" is displayed as "failed"
99
    And I log out
100
    And I log in as "teacher1"
101
    And I am on "Course 1" course homepage
102
    And "Vinnie Student1" user has completed "Music history" activity
103
 
104
  @javascript
105
  Scenario: View automatic completion items as a passing student
106
    Given I am on the "Music history" "data activity" page logged in as student1
107
    And the "View" completion condition of "Music history" is displayed as "done"
108
    And the "Make entries: 2" completion condition of "Music history" is displayed as "todo"
109
    And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
110
    And the "Receive a passing grade" completion condition of "Music history" is displayed as "todo"
111
    And the following "mod_data > entries" exist:
112
      | database | user     | Instrument types |
113
      | mh1      | student1 | Drums            |
114
    And I am on "Course 1" course homepage
115
    # One entry is not enough to mark as complete.
116
    And the "View" completion condition of "Music history" is displayed as "done"
117
    And the "Make entries: 2" completion condition of "Music history" is displayed as "todo"
118
    And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
119
    And the "Receive a passing grade" completion condition of "Music history" is displayed as "todo"
120
    And the following "mod_data > entries" exist:
121
      | database | user     | Instrument types |
122
      | mh1      | student1 | Hurdygurdy       |
123
    And I am on "Course 1" course homepage
124
    And the "View" completion condition of "Music history" is displayed as "done"
125
    And the "Make entries: 2" completion condition of "Music history" is displayed as "done"
126
    And the "Receive a grade" completion condition of "Music history" is displayed as "todo"
127
    And the "Receive a passing grade" completion condition of "Music history" is displayed as "todo"
128
    And I log out
129
    And I am on the "Music history" "data activity" page logged in as teacher1
130
    And I select "Single view" from the "jump" singleselect
131
    And I set the field "rating" to "60"
132
    And I log out
133
    When I am on the "Music history" "data activity" page logged in as student1
134
    Then the "View" completion condition of "Music history" is displayed as "done"
135
    And the "Make entries: 2" completion condition of "Music history" is displayed as "done"
136
    And the "Receive a grade" completion condition of "Music history" is displayed as "done"
137
    And the "Receive a passing grade" completion condition of "Music history" is displayed as "done"
138
    And I log out
139
    And I log in as "teacher1"
140
    And I am on "Course 1" course homepage
141
    And "Vinnie Student1" user has completed "Music history" activity