Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@gradereport @gradereport_grader
2
Feature: We can sort grades/user fields on the grader report
3
  In order to manage grades on grader report
4
  As a teacher
5
  I need to be able to sort grades or user fields.
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 | StudentA   | 2        | d@example.com |
15
      | student2 | StudentB   | 4        | a@example.com |
16
      | student3 | StudentC   | 3        | c@example.com |
17
      | student4 | StudentD   | 1        | b@example.com |
18
    And the following "course enrolments" exist:
19
      | user     | course | role           |
20
      | teacher1 | C1     | editingteacher |
21
      | student1 | C1     | student        |
22
      | student2 | C1     | student        |
23
      | student3 | C1     | student        |
24
      | student4 | C1     | student        |
25
    And the following "activities" exist:
26
      | activity | course | section | name                   | intro                   | assignsubmission_onlinetext_enabled | submissiondrafts |
27
      | assign   | C1     | 1       | Test assignment name 1 | Submit your online text | 1                                   | 0                |
28
    And the following "mod_assign > submissions" exist:
29
      | assign                 | user     | onlinetext                            |
30
      | Test assignment name 1 | student1 | This is a submission for assignment 1 |
31
      | Test assignment name 1 | student2 | This is a submission for assignment 1 |
32
      | Test assignment name 1 | student3 | This is a submission for assignment 1 |
33
      | Test assignment name 1 | student4 | This is a submission for assignment 1 |
34
    And the following "grade items" exist:
35
      | itemname     | grademin | grademax | course |
36
      | Manual grade | 20       | 40       | C1     |
37
    And the following "grade grades" exist:
38
      | gradeitem              | user     | grade |
39
      | Test assignment name 1 | student1 | 80    |
40
      | Test assignment name 1 | student2 | 40    |
41
      | Test assignment name 1 | student3 | 60    |
42
    And I log in as "teacher1"
43
 
44
  @javascript
45
  Scenario: Sort grades or user fields on grader report by using cell action menu
46
    When I am on "Course 1" course homepage with editing mode on
47
    And I navigate to "View > Grader report" in the course gradebook
48
    # Default sorting is lastname ascending.
49
    And "StudentD 1" "table_row" should appear before "StudentA 2" "table_row"
50
    And "StudentA 2" "table_row" should appear before "StudentC 3" "table_row"
51
    And "StudentC 3" "table_row" should appear before "StudentB 4" "table_row"
52
    # Sort by grades in descending order.
53
    And I click on grade item menu "Test assignment name 1" of type "gradeitem" on "grader" page
54
    And I choose "Descending" in the open action menu
55
    And I wait until the page is ready
56
    Then "StudentA 2" "table_row" should appear before "StudentC 3" "table_row"
57
    And "StudentC 3" "table_row" should appear before "StudentB 4" "table_row"
58
    And "StudentB 4" "table_row" should appear before "StudentD 1" "table_row"
59
    # Sort by grades in ascending order.
60
    And I click on grade item menu "Test assignment name 1" of type "gradeitem" on "grader" page
61
    And I choose "Ascending" in the open action menu
62
    And I wait until the page is ready
63
    Then "StudentD 1" "table_row" should appear before "StudentB 4" "table_row"
64
    And "StudentB 4" "table_row" should appear before "StudentC 3" "table_row"
65
    And "StudentC 3" "table_row" should appear before "StudentA 2" "table_row"
66
    # Sort by email in ascending order.
67
    And I click on user profile field menu "email"
68
    And I choose "Ascending" in the open action menu
69
    And I wait until the page is ready
70
    Then "StudentB 4" "table_row" should appear before "StudentD 1" "table_row"
71
    And "StudentD 1" "table_row" should appear before "StudentC 3" "table_row"
72
    And "StudentC 3" "table_row" should appear before "StudentA 2" "table_row"
73
    And I click on user profile field menu "email"
74
    # Sort by email in descending order.
75
    And I choose "Descending" in the open action menu
76
    And I wait until the page is ready
77
    Then "StudentA 2" "table_row" should appear before "StudentC 3" "table_row"
78
    And "StudentC 3" "table_row" should appear before "StudentD 1" "table_row"
79
    And "StudentD 1" "table_row" should appear before "StudentB 4" "table_row"