1441 |
ariadna |
1 |
@mod_quiz @quizaccess @quizaccess_seb
|
|
|
2 |
Feature: SEB settings in quiz access rule
|
|
|
3 |
|
|
|
4 |
Background:
|
|
|
5 |
Given the following "users" exist:
|
|
|
6 |
| username | firstname | lastname | email |
|
|
|
7 |
| student1 | Student | 1 | student1@example.com |
|
|
|
8 |
And the following "courses" exist:
|
|
|
9 |
| fullname | shortname |
|
|
|
10 |
| Course 1 | C1 |
|
|
|
11 |
And the following "course enrolments" exist:
|
|
|
12 |
| user | course | role |
|
|
|
13 |
| student1 | C1 | student |
|
|
|
14 |
|
|
|
15 |
Scenario Outline: Require the use of Safe Exam Browser set to Yes – Configure manually shows message to students
|
|
|
16 |
Given the following "activities" exist:
|
|
|
17 |
| activity | course | name | seb_requiresafeexambrowser | idnumber |
|
|
|
18 |
| quiz | C1 | Quiz 1 | <sebsetting> | quiz1 |
|
|
|
19 |
And the following "question categories" exist:
|
|
|
20 |
| contextlevel | reference | name |
|
|
|
21 |
| Activity module | quiz1 | Test questions |
|
|
|
22 |
And the following "questions" exist:
|
|
|
23 |
| questioncategory | qtype | name | questiontext |
|
|
|
24 |
| Test questions | truefalse | Reading | Can you read this? |
|
|
|
25 |
And quiz "Quiz 1" contains the following questions:
|
|
|
26 |
| question | page |
|
|
|
27 |
| Reading | 1 |
|
|
|
28 |
When I am on the "Quiz 1" "quiz activity" page logged in as student1
|
|
|
29 |
Then I <messagevisibility> see "This quiz has been configured so that students may only attempt it using the Safe Exam Browser."
|
|
|
30 |
And "Attempt quiz" "button" <attemptbuttonvisibility> exist
|
|
|
31 |
|
|
|
32 |
Examples:
|
|
|
33 |
| sebsetting | messagevisibility | attemptbuttonvisibility |
|
|
|
34 |
| 0 | should not | should |
|
|
|
35 |
| 1 | should | should not |
|
|
|
36 |
|
|
|
37 |
Scenario Outline: Show Safe Exam Browser download button setting controls visibility of download link
|
|
|
38 |
Given the following "activities" exist:
|
|
|
39 |
| activity | course | name | idnumber | seb_requiresafeexambrowser | seb_showsebdownloadlink |
|
|
|
40 |
| quiz | C1 | Quiz 1 | quiz1 | 1 | <seb_showsebdownloadlink> |
|
|
|
41 |
And the following "question categories" exist:
|
|
|
42 |
| contextlevel | reference | name |
|
|
|
43 |
| Activity module | quiz1 | Test questions |
|
|
|
44 |
And the following "questions" exist:
|
|
|
45 |
| questioncategory | qtype | name | questiontext |
|
|
|
46 |
| Test questions | truefalse | Reading | Can you read this? |
|
|
|
47 |
And quiz "Quiz 1" contains the following questions:
|
|
|
48 |
| question | page |
|
|
|
49 |
| Reading | 1 |
|
|
|
50 |
When I am on the "Quiz 1" "quiz activity" page logged in as student1
|
|
|
51 |
Then "Download Safe Exam Browser" "link" <downloadseblinkvisibility> exist
|
|
|
52 |
And I should see "This quiz has been configured so that students may only attempt it using the Safe Exam Browser."
|
|
|
53 |
|
|
|
54 |
Examples:
|
|
|
55 |
| seb_showsebdownloadlink | downloadseblinkvisibility |
|
|
|
56 |
| 0 | should not |
|
|
|
57 |
| 1 | should |
|