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
@mod @mod_h5pactivity @core_h5p
2
Feature: Teacher can control h5p activity grading setting
3
  In order to set h5p activity grade
4
  As a teacher
5
  I need to be able to control h5p activity grading setting
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email                |
10
      | teacher1 | Teacher   | 1        | teacher1@example.com |
11
      | student1 | Student   | 1        | student1@example.com |
12
      | student2 | Student   | 2        | student2@example.com |
13
      | student3 | Student   | 3        | student3@example.com |
14
      | student4 | Student   | 4        | student4@example.com |
15
    And the following "courses" exist:
16
      | fullname | shortname |
17
      | Course 1 | C1        |
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
 
26
  @javascript
27
  Scenario: Verify that invalid grades given to students are not saved
28
    Given the following "activities" exist:
29
      | activity    | name      | course |
30
      | h5pactivity | H5P point | C1     |
31
    # Activity grade settings are not saved using generators so manual setting is necessary.
32
    And I am on the "H5P point" "h5pactivity activity editing" page logged in as teacher1
33
    And I set the following fields to these values:
34
      | grade[modgrade_type]  | Point |
35
      | grade[modgrade_point] | 10    |
36
    And I press "Save and return to course"
37
    And I navigate to "View > Grader report" in the course gradebook
38
    And I turn editing mode on
39
    When I give the grade "50" to the user "Student 1" for the grade item "H5P point"
40
    And I press "Save changes"
41
    And I turn editing mode off
42
    # Confirm that grades are not saved when grade entered is > maximum grade.
43
    Then the following should exist in the "user-grades" table:
11 efrain 44
      | -1-       | -2-                  | -3- |
1 efrain 45
      | Student 1 | student1@example.com | -   |
46
      | Student 2 | student2@example.com | -   |
47
      | Student 3 | student3@example.com | -   |
48
      | Student 4 | student4@example.com | -   |
49
 
50
  @javascript
51
  Scenario: Verify that valid grades given to students are saved
52
    Given the following "activities" exist:
53
      | activity    | name      | course |
54
      | h5pactivity | H5P point | C1     |
55
    # Activity grade settings are not saved using generators so manual setting is necessary.
56
    And I am on the "H5P point" "h5pactivity activity editing" page logged in as teacher1
57
    And I set the following fields to these values:
58
      | grade[modgrade_type]  | Point |
59
      | grade[modgrade_point] | 10    |
60
    And I press "Save and return to course"
61
    And I navigate to "View > Grader report" in the course gradebook
62
    And I turn editing mode on
63
    When I give the grade "10" to the user "Student 1" for the grade item "H5P point"
64
    And I give the grade "5" to the user "Student 2" for the grade item "H5P point"
65
    And I give the grade "0" to the user "Student 3" for the grade item "H5P point"
66
    And I press "Save changes"
67
    And I turn editing mode off
68
    # Confirm that corresponding grades are stored for each student.
69
    And the following should exist in the "user-grades" table:
11 efrain 70
      | -1-       | -2-                  | -3- |
1 efrain 71
      | Student 1 | student1@example.com | 10  |
72
      | Student 2 | student2@example.com | 5   |
73
      | Student 3 | student3@example.com | 0   |
74
      | Student 4 | student4@example.com | -   |
75
 
76
  @javascript
77
  Scenario: Verify that scales given to students are saved
78
    Given the following "activities" exist:
79
      | activity    | name      | course |
80
      | h5pactivity | H5P scale | C1     |
81
    # Activity grade settings are not saved using generators so manual setting is necessary.
82
    And I am on the "H5P scale" "h5pactivity activity editing" page logged in as teacher1
83
    And I set the following fields to these values:
84
      | grade[modgrade_type]  | Scale                    |
85
      | grade[modgrade_scale] | Default competence scale |
86
    And I press "Save and return to course"
87
    And I navigate to "View > Grader report" in the course gradebook
88
    And I turn editing mode on
89
    And I give the grade "Not yet competent" to the user "Student 1" for the grade item "H5P scale"
90
    And I give the grade "Competent" to the user "Student 2" for the grade item "H5P scale"
91
    And I give the grade "Competent" to the user "Student 4" for the grade item "H5P scale"
92
    When I press "Save changes"
93
    And I turn editing mode off
94
    # Confirm that scale set for student is successfully saved.
95
    Then the following should exist in the "user-grades" table:
11 efrain 96
      | -1-       | -2-                  | -3-               |
1 efrain 97
      | Student 1 | student1@example.com | Not yet competent |
98
      | Student 2 | student2@example.com | Competent         |
99
      | Student 3 | student3@example.com | -                 |
100
      | Student 4 | student4@example.com | Competent         |