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: Admin can set Recover grades default setting
3
  In order to recover grades
4
  As an admin
5
  I need to enable "Recover grades default" from site administration
6
 
7
  Background:
8
    Given the following "courses" exist:
9
      | fullname | shortname |
10
      | Course 1 | C1        |
11
    And the following "users" exist:
12
      | username | firstname | lastname | email                |
13
      | student1 | Student   | One      | student1@example.com |
14
    And the following "course enrolments" exist:
15
      | user     | course | role    |
16
      | student1 | C1     | student |
17
    And the following "activities" exist:
18
      | activity | course | name     |
19
      | assign   | C1     | Assign 1 |
20
 
21
  Scenario Outline: Recover grades default setting can be changed
22
    Given the following config values are set as admin:
23
      | recovergradesdefault  | <recovergradesetting>  |
24
    # Grade student 1 via quick grading
25
    And I am on the "Assign 1" "assign activity" page logged in as admin
26
    And I follow "View all submissions"
27
    And I click on "Quick grading" "checkbox"
28
    And I set the field "User grade" to "60.00"
29
    And I press "Save all quick grading changes"
30
    # Confirm that assigned grade was saved
31
    And I am on the "Course 1" "grades > Grader report > View" page
32
    And I should see "60.00" in the "Student One" "table_row"
33
    And I navigate to course participants
34
    And I click on "Unenrol" "icon" in the "Student One" "table_row"
35
    And I click on "Unenrol" "button" in the "Unenrol" "dialogue"
36
    And I press "Enrol users"
37
    And I set the field "Select users" to "student1"
38
    # Confirm the "Recover user's old grades if possible" checkbox state based on Recover grades default setting
39
    When I click on "Show more..." "link"
40
    Then the field "Recover user's old grades if possible" matches value "<oldgraderecover>"
41
    # Confirm that "Recover user's old grades if possible" checkbox state can be changed manually
42
    And I click on "Recover user's old grades if possible" "checkbox" in the "Enrol users" "dialogue"
43
    And I click on "Enrol users" "button" in the "Enrol users" "dialogue"
44
    # Confirm whether re-enrolled student's grade is recovered or not based on student enrolment settings
45
    And I am on the "Course 1" "grades > Grader report > View" page
46
    And I <gradevisibility> see "60.00" in the "Student One" "table_row"
47
 
48
    Examples:
49
      | recovergradesetting | oldgraderecover | gradevisibility |
50
      | 0                   | 0               | should          |
51
      | 1                   | 1               | should not      |