1 |
efrain |
1 |
@mod @mod_quiz @core_completion
|
|
|
2 |
Feature: View activity completion in the quiz activity
|
|
|
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
|
|
|
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 |
|
|
|
24 |
| Test questions | truefalse | First question | Answer the first question |
|
|
|
25 |
And the following "activity" exists:
|
|
|
26 |
| activity | quiz |
|
|
|
27 |
| course | C1 |
|
|
|
28 |
| idnumber | quiz1 |
|
|
|
29 |
| name | Test quiz name |
|
|
|
30 |
| section | 1 |
|
|
|
31 |
| attempts | 2 |
|
|
|
32 |
| gradepass | 5.00 |
|
|
|
33 |
| completion | 2 |
|
|
|
34 |
| completionview | 1 |
|
|
|
35 |
| completionusegrade | 1 |
|
|
|
36 |
| completionpassgrade | 1 |
|
|
|
37 |
| completionattemptsexhausted | 1 |
|
|
|
38 |
| completionminattemptsenabled | 1 |
|
|
|
39 |
| completionminattempts | 1 |
|
|
|
40 |
And quiz "Test quiz name" contains the following questions:
|
|
|
41 |
| question | page |
|
|
|
42 |
| First question | 1 |
|
|
|
43 |
|
|
|
44 |
Scenario Outline: View automatic completion items as a student
|
|
|
45 |
When I log in as "student1"
|
|
|
46 |
And I am on "Course 1" course homepage
|
|
|
47 |
And I follow "Test quiz name"
|
|
|
48 |
And the "View" completion condition of "Test quiz name" is displayed as "done"
|
|
|
49 |
And the "Make attempts: 1" completion condition of "Test quiz name" is displayed as "todo"
|
|
|
50 |
And the "Receive a grade" completion condition of "Test quiz name" is displayed as "todo"
|
|
|
51 |
And the "Receive a passing grade" completion condition of "Test quiz name" is displayed as "todo"
|
|
|
52 |
And the "Receive a pass grade or complete all available attempts" completion condition of "Test quiz name" is displayed as "todo"
|
|
|
53 |
And user "student1" has attempted "Test quiz name" with responses:
|
|
|
54 |
| slot | response |
|
|
|
55 |
| 1 | False |
|
|
|
56 |
And I am on "Course 1" course homepage
|
|
|
57 |
And I follow "Test quiz name"
|
|
|
58 |
And the "View" completion condition of "Test quiz name" is displayed as "done"
|
|
|
59 |
And the "Make attempts: 1" completion condition of "Test quiz name" is displayed as "done"
|
|
|
60 |
And the "Receive a grade" completion condition of "Test quiz name" is displayed as "done"
|
|
|
61 |
And the "Receive a passing grade" completion condition of "Test quiz name" is displayed as "failed"
|
|
|
62 |
And the "Receive a pass grade or complete all available attempts" completion condition of "Test quiz name" is displayed as "todo"
|
|
|
63 |
And I press "Re-attempt quiz"
|
|
|
64 |
And I set the field "<answer>" to "1"
|
|
|
65 |
And I press "Finish attempt ..."
|
|
|
66 |
And I press "Submit all and finish"
|
|
|
67 |
And I follow "Finish review"
|
|
|
68 |
And the "View" completion condition of "Test quiz name" is displayed as "done"
|
|
|
69 |
And the "Make attempts: 1" completion condition of "Test quiz name" is displayed as "done"
|
|
|
70 |
And the "Receive a grade" completion condition of "Test quiz name" is displayed as "done"
|
|
|
71 |
And the "Receive a passing grade" completion condition of "Test quiz name" is displayed as "<passcompletionexpected>"
|
|
|
72 |
And the "Receive a pass grade or complete all available attempts" completion condition of "Test quiz name" is displayed as "done"
|
|
|
73 |
And I log out
|
|
|
74 |
And I log in as "teacher1"
|
|
|
75 |
And I am on "Course 1" course homepage
|
|
|
76 |
And I navigate to "Reports" in current page administration
|
|
|
77 |
And I click on "Activity completion" "link"
|
|
|
78 |
And "<expectedactivitycompletion>" "icon" should exist in the "Student 1" "table_row"
|
|
|
79 |
|
|
|
80 |
Examples:
|
|
|
81 |
| answer | passcompletionexpected | expectedactivitycompletion |
|
|
|
82 |
| False | failed | Completed (did not achieve pass grade) |
|
|
|
83 |
| True | done | Completed (achieved pass grade) |
|