Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 50... Línea 50...
50
      | image       | badges/tests/behat/badge.png |
50
      | image       | badges/tests/behat/badge.png |
51
    And I am on the "Course 1" course page logged in as teacher1
51
    And I am on the "Course 1" course page logged in as teacher1
Línea 52... Línea 52...
52
 
52
 
53
  Scenario: Student does not earn a badge using activity completion when does not get passing grade
53
  Scenario: Student does not earn a badge using activity completion when does not get passing grade
54
    Given I navigate to "Badges" in current page administration
-
 
55
    And I press "Manage badges"
54
    Given I navigate to "Badges" in current page administration
56
    And I follow "Course Badge 1"
55
    And I follow "Course Badge 1"
57
    And I select "Criteria" from the "jump" singleselect
56
    And I select "Criteria" from the "jump" singleselect
58
    And I set the field "type" to "Activity completion"
57
    And I set the field "type" to "Activity completion"
59
    And I set the field "Quiz - Test quiz name 1" to "1"
58
    And I set the field "Quiz - Test quiz name 1" to "1"
60
    And I press "Save"
59
    And I press "Save"
61
    And I press "Enable access"
60
    And I press "Enable access"
62
    And I press "Continue"
61
    And I click on "Enable" "button" in the "Confirm" "dialogue"
63
    And I should see "Recipients (0)"
62
    And I should see "Recipients (0)"
64
    # Pass grade for student1. Activity is considered complete because student1 got a passing grade.
63
    # Pass grade for student1. Activity is considered complete because student1 got a passing grade.
65
    And user "student1" has attempted "Test quiz name 1" with responses:
64
    And user "student1" has attempted "Test quiz name 1" with responses:
66
      | slot | response |
65
      | slot | response |
67
      | 1    | True     |
66
      | 1    | True     |
68
    # Fail grade for student2. Activity is considered incomplete because student2 got a failing grade.
67
    # Fail grade for student2. Activity is considered incomplete because student2 got a failing grade.
69
    And user "student2" has attempted "Test quiz name 1" with responses:
68
    And user "student2" has attempted "Test quiz name 1" with responses:
70
      | slot | response |
69
      | slot | response |
71
      | 1    | False    |
70
      | 1    | False    |
72
    And I navigate to "Badges > Manage badges" in current page administration
71
    And I navigate to "Badges" in current page administration
73
    And I follow "Course Badge 1"
72
    And I follow "Course Badge 1"
74
    Then I should see "Recipients (1)"
73
    Then I should see "Recipients (1)"
75
    And I select "Recipients (1)" from the "jump" singleselect
74
    And I select "Recipients (1)" from the "jump" singleselect
76
    And I should see "Student 1"
75
    And I should see "Student 1"
Línea 77... Línea 76...
77
    And I should not see "Student 2"
76
    And I should not see "Student 2"
78
 
77
 
79
  Scenario: Students with any grades in an activity will receive a badge if the completion condition is set to receive any grade
-
 
80
    Given I navigate to "Badges" in current page administration
78
  Scenario: Students with any grades in an activity will receive a badge if the completion condition is set to receive any grade
81
    And I press "Manage badges"
79
    Given I navigate to "Badges" in current page administration
82
    And I follow "Course Badge 2"
80
    And I follow "Course Badge 2"
83
    And I select "Criteria" from the "jump" singleselect
81
    And I select "Criteria" from the "jump" singleselect
84
    And I set the field "type" to "Activity completion"
82
    And I set the field "type" to "Activity completion"
85
    And I set the field "Quiz - Test quiz name 2" to "1"
83
    And I set the field "Quiz - Test quiz name 2" to "1"
86
    And I press "Save"
84
    And I press "Save"
87
    And I press "Enable access"
85
    And I press "Enable access"
88
    And I press "Continue"
86
    And I click on "Enable" "button" in the "Confirm" "dialogue"
89
    # Pass grade for student1.
87
    # Pass grade for student1.
90
    And user "student1" has attempted "Test quiz name 2" with responses:
88
    And user "student1" has attempted "Test quiz name 2" with responses:
91
      | slot | response |
89
      | slot | response |
92
      | 1    | True     |
90
      | 1    | True     |
93
    # Fail grade for student2. Activity is considered complete even if student2 got a failing grade.
91
    # Fail grade for student2. Activity is considered complete even if student2 got a failing grade.
94
    And user "student2" has attempted "Test quiz name 2" with responses:
92
    And user "student2" has attempted "Test quiz name 2" with responses:
95
      | slot | response |
93
      | slot | response |
96
      | 1    | False    |
94
      | 1    | False    |
97
    And I navigate to "Badges > Manage badges" in current page administration
95
    And I navigate to "Badges" in current page administration
98
    And I follow "Course Badge 2"
96
    And I follow "Course Badge 2"
99
    Then I should see "Recipients (2)"
97
    Then I should see "Recipients (2)"
100
    And I select "Recipients (2)" from the "jump" singleselect
98
    And I select "Recipients (2)" from the "jump" singleselect
Línea 109... Línea 107...
109
    # Fail grade for student2.
107
    # Fail grade for student2.
110
    And user "student2" has attempted "Test quiz name 1" with responses:
108
    And user "student2" has attempted "Test quiz name 1" with responses:
111
      | slot | response |
109
      | slot | response |
112
      | 1    | False    |
110
      | 1    | False    |
113
    And I navigate to "Badges" in current page administration
111
    And I navigate to "Badges" in current page administration
114
    And I press "Manage badges"
-
 
115
    And I follow "Course Badge 1"
112
    And I follow "Course Badge 1"
116
    And I select "Criteria" from the "jump" singleselect
113
    And I select "Criteria" from the "jump" singleselect
117
    And I set the field "type" to "Activity completion"
114
    And I set the field "type" to "Activity completion"
118
    And I set the field "Quiz - Test quiz name 1" to "1"
115
    And I set the field "Quiz - Test quiz name 1" to "1"
119
    And I press "Save"
116
    And I press "Save"
120
    # Enable badge access once students have completed the activity.
117
    # Enable badge access once students have completed the activity.
121
    When I press "Enable access"
118
    When I press "Enable access"
122
    And I press "Continue"
119
    And I click on "Enable" "button" in the "Confirm" "dialogue"
123
    # Only student1 should earn the badge because student2 did not pass the quiz.
120
    # Only student1 should earn the badge because student2 did not pass the quiz.
124
    Then I should see "Recipients (1)"
121
    Then I should see "Recipients (1)"
125
    And I select "Recipients (1)" from the "jump" singleselect
122
    And I select "Recipients (1)" from the "jump" singleselect
126
    And I should see "Student 1"
123
    And I should see "Student 1"
127
    And I should not see "Student 2"
124
    And I should not see "Student 2"