Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_grades @javascript
2
Feature: Hidden grade items should be hidden when grade category is locked, but should be visible in overridden category
3
  In order to verify existing grades items display as expected
4
  As an teacher
5
  I need to modify grade items and grade categories
6
  I need to ensure existing grades display in an expected manner
7
 
8
  Background:
9
    Given the following "courses" exist:
10
      | fullname | shortname | category | groupmode |
11
      | Course 1 | C1 | 0 | 1 |
12
    And the following "users" exist:
13
      | username | firstname | lastname | email | idnumber |
14
      | teacher1 | Teacher | 1 | teacher1@example.com | t1 |
15
      | student1 | Student | 1 | student1@example.com | s1 |
16
    And the following "course enrolments" exist:
17
      | user | course | role |
18
      | teacher1 | C1 | editingteacher |
19
      | student1 | C1 | student |
20
    And I am on the "Course 1" "grades > gradebook setup" page logged in as "admin"
21
    And I choose the "Add category" item in the "Add" action menu
22
    And I set the following fields to these values:
23
      | Category name | Test locked category |
24
    And I click on "Save" "button" in the "New category" "dialogue"
25
    And I wait until the page is ready
26
    And I choose the "Add grade item" item in the "Add" action menu
27
    And I set the following fields to these values:
28
      | Item name | Hidden item |
29
      | Hidden | 1 |
30
      | Grade category | Test locked category |
31
    And I click on "Save" "button" in the "New grade item" "dialogue"
32
    And I am on the "Course 1" "grades > Grader report > View" page logged in as "teacher1"
33
    And I turn editing mode on
34
    And I give the grade "50.00" to the user "Student 1" for the grade item "Hidden item"
35
    And I press "Save changes"
36
    And I navigate to "Setup > Gradebook setup" in the course gradebook
37
    And I set the following settings for grade item "Test locked category" of type "category" on "setup" page:
38
      | Locked | 1 |
39
 
40
  Scenario: Hidden grade items in locked category is hidden for teacher
41
    Given I am on the "Course 1" "grades > User report > View" page logged in as teacher1
42
    And I click on "Student 1" in the "user" search widget
43
    When I set the field "View report as" to "Myself"
44
    Then the following should exist in the "user-grade" table:
45
      | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
46
      | Test locked category total | 100.00 % | 50.00 | 0–100 | 50.00 % | - |
47
      | Course total | - | 50.00 | 0–100 | 50.00 % | - |
48
 
49
  Scenario: Hidden grade items in locked category is hidden for student
50
    When I am on the "Course 1" "grades > User report > View" page logged in as student1
51
    Then the following should exist in the "user-grade" table:
52
      | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
53
      | Test locked category total | 100.00 % | - | 0–100 | - | - |
54
      | Course total | - | - | 0–100 | - | - |
55
    And I should not see "Hidden item"
56
 
57
  Scenario: Hidden grade items in overridden category should show
58
    Given I am on the "Course 1" "grades > gradebook setup" page
59
    And I choose the "Add category" item in the "Add" action menu
60
    And I set the following fields to these values:
61
      | Category name | Test overridden category B|
62
    And I click on "Save" "button" in the "New category" "dialogue"
63
    And I wait until the page is ready
64
    And I choose the "Add grade item" item in the "Add" action menu
65
    And I set the following fields to these values:
66
      | Item name | Cat b item |
67
      | Grade category | Test overridden category B |
68
    And I click on "Save" "button" in the "New grade item" "dialogue"
69
    When I navigate to "View > Grader report" in the course gradebook
70
    And I turn editing mode on
71
    And I give the grade "50.00" to the user "Student 1" for the grade item "Test overridden category B total"
72
    And I press "Save changes"
73
    And I am on the "Course 1" "grades > User report > View" page logged in as "student1"
74
    Then the following should exist in the "user-grade" table:
75
      | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
76
      | Test locked category total | 50.00 % | - | 0–100 | - | - |
77
      | Test overridden category B total | 50.00 % | 50.00 | 0–100 | 50.00 % | - |
78
      | Course total | - | - | 0–200 | - | - |