Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_grades @gradereport_user @javascript
2
Feature: We can use the user report
3
  As a user
4
  I browse to the User report
5
 
6
  Background:
7
    Given the following "courses" exist:
8
      | fullname | shortname | category | groupmode |
9
      | Course 1 | C1        | 0        | 1         |
10
 
11
  Scenario: Verify we can view a user grade report with no users enrolled.
12
    When I am on the "Course 1" "grades > User report > View" page logged in as "admin"
13
    Then I should see "There are no students enrolled in this course."
14
 
15
  Scenario: Teacher sees his last viewed user report when navigating back to the gradebook user report.
16
    Given the following "users" exist:
17
      | username | firstname | lastname | email                |
18
      | teacher1 | Teacher   | 1        | teacher1@example.com |
19
      | teacher2 | Teacher   | 2        | teacher2@example.com |
20
      | student1 | Student   | 1        | student1@example.com |
21
    And the following "course enrolments" exist:
22
      | user     | course | role           |
23
      | teacher1 | C1     | editingteacher |
24
      | teacher2 | C1     | editingteacher |
25
      | student1 | C1     | student        |
26
    And I am on the "Course 1" "grades > User report > View" page logged in as "teacher1"
27
    And I should see "Search for a user to view their report" in the "region-main" "region"
28
    And I click on "Student 1" in the "user" search widget
29
    And I should see "Student 1" in the "region-main" "region"
30
    When I am on the "Course 1" "grades > User report > View" page
31
    Then I should not see "Search for a user to view their report" in the "region-main" "region"
32
    And I should see "Student 1" in the "region-main" "region"
33
    And I am on the "Course 1" "grades > User report > View" page logged in as "teacher2"
34
    And I should see "Search for a user to view their report" in the "region-main" "region"
35
 
36
  Scenario: Teacher sees his last viewed user report if the user is a part of the the current group.
37
    Given the following "groups" exist:
38
      | name    | course | idnumber | participation |
39
      | Group 1 | C1     | G1       | 1             |
40
    And the following "users" exist:
41
      | username | firstname | lastname | email                |
42
      | teacher1 | Teacher   | 1        | teacher1@example.com |
43
      | student1 | Student   | 1        | student1@example.com |
44
      | student2 | Student   | 2        | student2@example.com |
45
    And the following "course enrolments" exist:
46
      | user     | course | role           |
47
      | teacher1 | C1     | editingteacher |
48
      | student1 | C1     | student        |
49
      | student2 | C1     | student        |
50
    And the following "group members" exist:
51
      | user     | group |
52
      | student2 | G1    |
53
    And I am on the "Course 1" "grades > User report > View" page logged in as "teacher1"
54
    And I click on "Student 2" in the "user" search widget
55
    And I navigate to "View > Grader report" in the course gradebook
56
    And I click on "Group 1" in the "group" search widget
57
    When I navigate to "View > User report" in the course gradebook
58
    Then I should see "Student 2" in the "region-main" "region"
59
    And I should not see "Search for a user to view their report" in the "region-main" "region"
60
 
61
  Scenario: Teacher does not see the last viewed user if the user is not a part of the the current group.
62
    Given the following "groups" exist:
63
      | name    | course | idnumber | participation |
64
      | Group 1 | C1     | G1       | 1             |
65
    And the following "users" exist:
66
      | username | firstname | lastname | email                |
67
      | teacher1 | Teacher   | 1        | teacher1@example.com |
68
      | student1 | Student   | 1        | student1@example.com |
69
      | student2 | Student   | 2        | student2@example.com |
70
    And the following "course enrolments" exist:
71
      | user     | course | role           |
72
      | teacher1 | C1     | editingteacher |
73
      | student1 | C1     | student        |
74
      | student2 | C1     | student        |
75
    And the following "group members" exist:
76
      | user     | group |
77
      | student2 | G1    |
78
    And I am on the "Course 1" "grades > User report > View" page logged in as "teacher1"
79
    And I click on "Student 1" in the "user" search widget
80
    And I navigate to "View > Grader report" in the course gradebook
81
    And I click on "Group 1" in the "group" search widget
82
    When I navigate to "View > User report" in the course gradebook
83
    Then I should see "Search for a user to view their report" in the "region-main" "region"
84
    And I should not see "Student 1" in the "region-main" "region"
85
 
86
  Scenario: Teacher does not see his last viewed user report if the user is no longer enrolled in the course.
87
    Given the following "users" exist:
88
      | username | firstname | lastname | email                |
89
      | teacher1 | Teacher   | 1        | teacher1@example.com |
90
      | student1 | Student   | 1        | student1@example.com |
91
      | student2 | Student   | 2        | student2@example.com |
92
    And the following "course enrolments" exist:
93
      | user     | course | role           |
94
      | teacher1 | C1     | editingteacher |
95
      | student1 | C1     | student        |
96
      | student2 | C1     | student        |
97
    And I am on the "Course 1" "grades > User report > View" page logged in as "teacher1"
98
    And I click on "Student 1" in the "user" search widget
99
    And I should see "Student 1" in the "region-main" "region"
100
    And I navigate to course participants
101
    And I click on "Unenrol" "icon" in the "Student 1" "table_row"
102
    And I click on "Unenrol" "button" in the "Unenrol" "dialogue"
103
    And I am on "Course 1" course homepage
104
    When I navigate to "View > User report" in the course gradebook
105
    Then I should see "Search for a user to view their report" in the "region-main" "region"
106
    And I should not see "Student 1" in the "region-main" "region"