1 |
efrain |
1 |
@qtype @qtype_essay
|
|
|
2 |
Feature: Test creating an Essay question
|
|
|
3 |
As a teacher
|
|
|
4 |
In order to test my students
|
|
|
5 |
I need to be able to create an Essay question
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username |
|
|
|
10 |
| teacher |
|
|
|
11 |
And the following "courses" exist:
|
|
|
12 |
| fullname | shortname | category |
|
|
|
13 |
| Course 1 | C1 | 0 |
|
|
|
14 |
And the following "course enrolments" exist:
|
|
|
15 |
| user | course | role |
|
|
|
16 |
| teacher | C1 | editingteacher |
|
|
|
17 |
|
|
|
18 |
Scenario: Create an Essay question with Response format set to 'HTML editor'
|
|
|
19 |
When I am on the "Course 1" "core_question > course question bank" page logged in as teacher
|
|
|
20 |
And I add a "Essay" question filling the form with:
|
|
|
21 |
| Question name | essay-001 |
|
|
|
22 |
| Question text | Write an essay with 500 words. |
|
|
|
23 |
| General feedback | This is general feedback |
|
|
|
24 |
| Response format | HTML editor |
|
|
|
25 |
Then I should see "essay-001"
|
|
|
26 |
|
|
|
27 |
Scenario: Create an Essay question with Response format set to 'HTML editor with the file picker'
|
|
|
28 |
When I am on the "Course 1" "core_question > course question bank" page logged in as teacher
|
|
|
29 |
And I add a "Essay" question filling the form with:
|
|
|
30 |
| Question name | essay-002 |
|
|
|
31 |
| Question text | Write an essay with 500 words. |
|
|
|
32 |
| General feedback | This is general feedback |
|
|
|
33 |
| id_responseformat | editorfilepicker |
|
|
|
34 |
Then I should see "essay-002"
|
|
|
35 |
|
|
|
36 |
@javascript
|
|
|
37 |
Scenario: Create an Essay question for testing some default options
|
|
|
38 |
When I am on the "Course 1" "core_question > course question bank" page logged in as teacher
|
|
|
39 |
And I add a "Essay" question filling the form with:
|
|
|
40 |
| Question name | essay-003 |
|
|
|
41 |
| Question text | Write an essay with 500 words. |
|
|
|
42 |
| General feedback | This is general feedback |
|
|
|
43 |
| id_responseformat | editorfilepicker |
|
|
|
44 |
| id_responserequired | 0 |
|
|
|
45 |
| id_responsefieldlines | 15 |
|
|
|
46 |
| id_attachments | 2 |
|
|
|
47 |
| id_attachmentsrequired | 2 |
|
|
|
48 |
| id_maxbytes | 10240 |
|
|
|
49 |
Then I should see "essay-003"
|
|
|
50 |
# Checking that the next new question form displays user preferences settings.
|
|
|
51 |
And I press "Create a new question ..."
|
|
|
52 |
And I set the field "item_qtype_essay" to "1"
|
|
|
53 |
And I click on "Add" "button" in the "Choose a question type to add" "dialogue"
|
|
|
54 |
And the following fields match these values:
|
|
|
55 |
| id_responseformat | editorfilepicker |
|
|
|
56 |
| id_responserequired | 0 |
|
|
|
57 |
| id_responsefieldlines | 15 |
|
|
|
58 |
| id_attachments | 2 |
|
|
|
59 |
| id_attachmentsrequired | 2 |
|
|
|
60 |
| id_maxbytes | 10240 |
|