1 |
efrain |
1 |
@qtype @qtype_shortanswer
|
|
|
2 |
Feature: Test creating a Short answer question
|
|
|
3 |
As a teacher
|
|
|
4 |
In order to test my students
|
|
|
5 |
I need to be able to create a Short answer 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 |
@javascript
|
|
|
19 |
Scenario: Create a Short answer question
|
|
|
20 |
When I am on the "Course 1" "core_question > course question bank" page logged in as teacher
|
|
|
21 |
And I add a "Short answer" question filling the form with:
|
|
|
22 |
| Question name | shortanswer-001 |
|
|
|
23 |
| Question text | What is the national langauge in France? |
|
|
|
24 |
| General feedback | The national langauge in France is French |
|
|
|
25 |
| Default mark | 1 |
|
|
|
26 |
| Case sensitivity | Yes, case must match |
|
|
|
27 |
| id_answer_0 | French |
|
|
|
28 |
| id_fraction_0 | 100% |
|
|
|
29 |
| id_feedback_0 | Well done. French is correct. |
|
|
|
30 |
| id_answer_1 | * |
|
|
|
31 |
| id_fraction_1 | None |
|
|
|
32 |
| id_feedback_1 | Your answer is incorrect. |
|
|
|
33 |
Then I should see "shortanswer-001"
|
|
|
34 |
# Checking that the next new question form displays user preferences settings.
|
|
|
35 |
And I press "Create a new question ..."
|
|
|
36 |
And I set the field "Short answer" to "1"
|
|
|
37 |
And I click on "Add" "button" in the "Choose a question type to add" "dialogue"
|
|
|
38 |
And the following fields match these values:
|
|
|
39 |
| Case sensitivity | Yes, case must match |
|