1 |
efrain |
1 |
@mod @mod_quiz @core_completion
|
|
|
2 |
Feature: Activity completion in the quiz activity with unlocked and re-grading.
|
|
|
3 |
In order to have visibility of quiz completion requirements
|
|
|
4 |
As a student
|
|
|
5 |
I need to be able to view my quiz completion progress even teacher have re-grading the grade pass.
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname | email |
|
|
|
10 |
| student1 | Student | 1 | student1@example.com |
|
|
|
11 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
|
|
12 |
And the following "courses" exist:
|
|
|
13 |
| fullname | shortname | category | enablecompletion |
|
|
|
14 |
| Course 1 | C1 | 0 | 1 |
|
|
|
15 |
And the following "course enrolments" exist:
|
|
|
16 |
| user | course | role |
|
|
|
17 |
| teacher1 | C1 | editingteacher |
|
|
|
18 |
| student1 | C1 | student |
|
|
|
19 |
And the following "question categories" exist:
|
|
|
20 |
| contextlevel | reference | name |
|
|
|
21 |
| Course | C1 | Test questions |
|
|
|
22 |
And the following "questions" exist:
|
|
|
23 |
| questioncategory | qtype | name | questiontext | defaultmark |
|
|
|
24 |
| Test questions | truefalse | First question | Answer the first question | 8 |
|
|
|
25 |
| Test questions | truefalse | Second question | Answer the second question | 2 |
|
|
|
26 |
And the following "activity" exists:
|
|
|
27 |
| activity | quiz |
|
|
|
28 |
| course | C1 |
|
|
|
29 |
| idnumber | quiz1 |
|
|
|
30 |
| name | Test quiz name |
|
|
|
31 |
| section | 1 |
|
|
|
32 |
| gradepass | 8 |
|
|
|
33 |
| grade | 10 |
|
|
|
34 |
| grademethod | 1 |
|
|
|
35 |
| completion | 2 |
|
|
|
36 |
| completionusegrade | 1 |
|
|
|
37 |
| completionpassgrade | 1 |
|
|
|
38 |
And quiz "Test quiz name" contains the following questions:
|
|
|
39 |
| question | page |
|
|
|
40 |
| First question | 1 |
|
|
|
41 |
| Second question | 2 |
|
|
|
42 |
|
|
|
43 |
@javascript
|
|
|
44 |
Scenario: Student will receive correct completion even when teacher unlocked completion and re-grading.
|
|
|
45 |
Given I am on the "Test quiz name" "quiz activity" page logged in as student1
|
|
|
46 |
And the "Receive a grade" completion condition of "Test quiz name" is displayed as "todo"
|
|
|
47 |
And the "Receive a passing grade" completion condition of "Test quiz name" is displayed as "todo"
|
|
|
48 |
And user "student1" has attempted "Test quiz name" with responses:
|
|
|
49 |
| slot | response |
|
|
|
50 |
| 1 | True |
|
|
|
51 |
| 2 | False |
|
|
|
52 |
And I am on "Course 1" course homepage
|
|
|
53 |
And I follow "Test quiz name"
|
|
|
54 |
And the "Receive a grade" completion condition of "Test quiz name" is displayed as "done"
|
|
|
55 |
And the "Receive a passing grade" completion condition of "Test quiz name" is displayed as "done"
|
|
|
56 |
And I log out
|
|
|
57 |
When I am on the "Course 1" course page logged in as teacher1
|
|
|
58 |
And I navigate to "Reports > Activity completion" in current page administration
|
|
|
59 |
And "Completed (achieved pass grade)" "icon" should exist in the "Student 1" "table_row"
|
|
|
60 |
And I am on the "Test quiz name" "quiz activity" page
|
|
|
61 |
And I navigate to "Settings" in current page administration
|
|
|
62 |
And I expand all fieldsets
|
|
|
63 |
And I press "Unlock completion settings"
|
|
|
64 |
And I set the following fields to these values:
|
|
|
65 |
| gradepass | 10 |
|
|
|
66 |
And I press "Save and return to course"
|
|
|
67 |
And I navigate to "Reports > Activity completion" in current page administration
|
|
|
68 |
Then "Completed (achieved pass grade)" "icon" should not exist in the "Student 1" "table_row"
|
|
|
69 |
And I log out
|
|
|
70 |
And I am on the "Test quiz name" "quiz activity" page logged in as student1
|
|
|
71 |
And the "Receive a grade" completion condition of "Test quiz name" is displayed as "done"
|
|
|
72 |
And the "Receive a passing grade" completion condition of "Test quiz name" is displayed as "failed"
|