1 |
efrain |
1 |
@core @core_question
|
|
|
2 |
Feature: A bank view with questions can be managed
|
|
|
3 |
In order to manage a question bank from the course
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to be able to view and manage questions
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname | email |
|
|
|
10 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
|
|
11 |
And the following "courses" exist:
|
|
|
12 |
| fullname | shortname | format |
|
|
|
13 |
| Course 1 | C1 | weeks |
|
|
|
14 |
And the following "course enrolments" exist:
|
|
|
15 |
| user | course | role |
|
|
|
16 |
| teacher1 | C1 | editingteacher |
|
1441 |
ariadna |
17 |
And the following "activities" exist:
|
|
|
18 |
| activity | name | course | idnumber |
|
|
|
19 |
| qbank | Qbank 1 | C1 | qbank1 |
|
1 |
efrain |
20 |
And the following "question categories" exist:
|
1441 |
ariadna |
21 |
| contextlevel | reference | name |
|
|
|
22 |
| Activity module | qbank1 | Test questions |
|
1 |
efrain |
23 |
|
|
|
24 |
@javascript
|
|
|
25 |
Scenario: Viewing question bank should not load individual questions
|
|
|
26 |
When the following "questions" exist:
|
|
|
27 |
| questioncategory | qtype | name | questiontext | idnumber |
|
|
|
28 |
| Test questions | essay | Essay test question | Write about whatever you want | qid |
|
|
|
29 |
| Test questions | numerical | Numerical test question | Write about whatever you want | qid |
|
1441 |
ariadna |
30 |
And I am on the "Qbank 1" "core_question > question bank" page logged in as "teacher1"
|
|
|
31 |
And I apply question bank filter "Category" with value "Test questions"
|
1 |
efrain |
32 |
And I should see "Essay test question"
|
|
|
33 |
And I should see "Numerical test question"
|
|
|
34 |
And I choose "Delete" action for "Essay test question" in the question bank
|
|
|
35 |
And I press "Delete"
|
|
|
36 |
And I should not see "Essay test question"
|
|
|
37 |
And I choose "Delete" action for "Numerical test question" in the question bank
|
|
|
38 |
And I press "Delete"
|
|
|
39 |
|
|
|
40 |
@javascript
|
|
|
41 |
Scenario: Unknown qtype does not break the view
|
|
|
42 |
When the following "questions" exist:
|
|
|
43 |
| questioncategory | qtype | name | questiontext |
|
|
|
44 |
| Test questions | missingtype | Unknown type question | Write about whatever you want |
|
|
|
45 |
| Test questions | truefalse | Truefalse type question | Write about whatever you want |
|
|
|
46 |
| Test questions | essay | Essay type question | Write about whatever you want |
|
1441 |
ariadna |
47 |
And I am on the "Qbank 1" "core_question > question bank" page logged in as "teacher1"
|
|
|
48 |
And I apply question bank filter "Category" with value "Test questions"
|
1 |
efrain |
49 |
And I should see "Unknown type question"
|
|
|
50 |
And I should see "Truefalse type question"
|
|
|
51 |
And I should see "Essay type question"
|