Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@gradereport @gradereport_grader
2
Feature: We can change what we are viewing on the grader report
3
  In order to check the expected results are displayed
4
  As a teacher
5
  I need to assign grades and check that they display correctly in the gradebook when switching between views.
6
 
7
  Background:
8
    Given the following "courses" exist:
9
      | fullname | shortname | format |
10
      | Course 1 | C1        | topics |
11
    And the following "users" exist:
12
      | username | firstname | lastname | email                |
13
      | teacher1 | Teacher   | 1        | teacher1@example.com |
14
      | student1 | Student   | 1        | student1@example.com |
15
      | student2 | Student   | 2        | student2@example.com |
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 the following "activities" exist:
22
      | activity | course | section | name                   | intro                   | assignsubmission_onlinetext_enabled | submissiondrafts |
23
      | assign   | C1     | 1       | Test assignment name 1 | Submit your online text | 1                                   | 0                |
24
      | assign   | C1     | 1       | Test assignment name 2 | submit your online text | 1                                   | 0                |
25
    And the following "mod_assign > submissions" exist:
26
      | assign                 | user     | onlinetext                            |
27
      | Test assignment name 1 | student1 | This is a submission for assignment 1 |
28
      | Test assignment name 2 | student1 | This is a submission for assignment 2 |
29
    And the following "grade items" exist:
30
      | itemname     | grademin | grademax | course |
31
      | Manual grade | 20       | 40       | C1     |
32
    And the following "grade grades" exist:
33
      | gradeitem              | user     | grade |
34
      | Test assignment name 1 | student1 | 80    |
35
      | Test assignment name 2 | student1 | 90    |
36
      | Manual grade           | student1 | 30    |
37
    And I log in as "teacher1"
38
 
39
  @javascript
40
  Scenario: View and minimise the grader report containing hidden activities
41
    When I am on "Course 1" course homepage with editing mode on
42
    And I open "Test assignment name 2" actions menu
43
    And I choose "Hide" in the open action menu
44
    And I am on "Course 1" course homepage with editing mode off
45
    And I navigate to "View > Grader report" in the course gradebook
46
    And I should see "Test assignment name 1" in the "user-grades" "table"
47
    And I should see "Test assignment name 2" in the "user-grades" "table"
48
    And I should see "Manual grade"
49
    And I should see "Course total"
50
    And the following should exist in the "user-grades" table:
11 efrain 51
      | -1-                | -2-                  | -3-       | -4-       | -5-       | -6-       |
1 efrain 52
      | Student 1          | student1@example.com | 80        | 90        | 30        | 170       |
53
    And I click on grade item menu "Course 1" of type "course" on "grader" page
54
    And I choose "Show totals only" in the open action menu
55
    And I should not see "Test assignment name 1" in the "user-grades" "table"
56
    And I should not see "Test assignment name 2" in the "user-grades" "table"
57
    And I should not see "Manual grade"
58
    And I should see "Course total"
59
    And the following should exist in the "user-grades" table:
11 efrain 60
      | -1-                | -2-                  | -3-       |
1 efrain 61
      | Student 1          | student1@example.com | 170       |
62
    And I click on grade item menu "Course 1" of type "course" on "grader" page
63
    And I click on "Show grades only" "link"
64
    And I should see "Test assignment name 1" in the "user-grades" "table"
65
    And I should see "Test assignment name 2" in the "user-grades" "table"
66
    And I should see "Manual grade"
67
    And I should not see "Course total"
68
    And the following should exist in the "user-grades" table:
11 efrain 69
      | -1-                | -2-                  | -3-       | -4-       | -5-       |
1 efrain 70
      | Student 1          | student1@example.com | 80        | 90        | 30        |
71
 
72
  @javascript @skip_chrome_zerosize
73
  Scenario: Minimise the grader report containing hidden activities without the 'moodle/grade:viewhidden' capability
74
    Given I am on "Course 1" course homepage with editing mode on
75
    And I open "Test assignment name 2" actions menu
76
    And I choose "Hide" in the open action menu
77
    And the following "role capability" exists:
78
      | role                    | editingteacher |
79
      | moodle/grade:viewhidden | prevent        |
80
    And I am on the "Course 1" "grades > Grader report > View" page logged in as "teacher1"
81
    Then I should see "Test assignment name 1" in the "user-grades" "table"
82
    And I should see "Test assignment name 2" in the "user-grades" "table"
83
    And I should see "Manual grade"
84
    And I should see "Course total"
85
    And the following should exist in the "user-grades" table:
11 efrain 86
      | -1-                | -2-                  | -3-       | -4-       | -5-       | -6-       |
1 efrain 87
      | Student 1          | student1@example.com | 80        | -         | 30        | 105.71    |
88
    And I click on grade item menu "Course 1" of type "course" on "grader" page
89
    And I choose "Show totals only" in the open action menu
90
    And I should not see "Test assignment name 1" in the "user-grades" "table"
91
    And I should not see "Test assignment name 2" in the "user-grades" "table"
92
    And I should not see "Manual grade"
93
    And I should see "Course total"
94
    And the following should exist in the "user-grades" table:
11 efrain 95
      | -1-                | -2-                  | -3-       |
1 efrain 96
      | Student 1          | student1@example.com | 105.71    |
97
    And I click on grade item menu "Course 1" of type "course" on "grader" page
98
    When I click on "Show grades only" "link"
99
    Then I should see "Test assignment name 1" in the "user-grades" "table"
100
    And I should see "Test assignment name 2" in the "user-grades" "table"
101
    And I should see "Manual grade"
102
    And I should not see "Course total"
103
    And the following should exist in the "user-grades" table:
11 efrain 104
      | -1-                | -2-                  | -3-       | -4-       | -5-       |
1 efrain 105
      | Student 1          | student1@example.com | 80        | -         | 30        |