| Línea 12... |
Línea 12... |
| 12 |
| username | firstname |
|
12 |
| username | firstname |
|
| 13 |
| teacher | Teacher |
|
13 |
| teacher | Teacher |
|
| 14 |
And the following "course enrolments" exist:
|
14 |
And the following "course enrolments" exist:
|
| 15 |
| user | course | role |
|
15 |
| user | course | role |
|
| 16 |
| teacher | C1 | editingteacher |
|
16 |
| teacher | C1 | editingteacher |
|
| - |
|
17 |
And the following "activities" exist:
|
| - |
|
18 |
| activity | name | course | idnumber |
|
| - |
|
19 |
| qbank | Qbank 1 | C1 | qbank1 |
|
| Línea 17... |
Línea 20... |
| 17 |
|
20 |
|
| 18 |
@javascript @_file_upload
|
21 |
@javascript @_file_upload
|
| 19 |
Scenario: import some true/false questions from Moodle XML format
|
22 |
Scenario: import some true/false questions from Moodle XML format
|
| 20 |
When I am on the "Course 1" "core_question > course question import" page logged in as "teacher"
|
23 |
When I am on the "Qbank 1" "core_question > question import" page logged in as "teacher"
|
| 21 |
And I set the field "id_format_xml" to "1"
|
24 |
And I set the field "id_format_xml" to "1"
|
| 22 |
And I upload "question/format/xml/tests/fixtures/truefalse.xml" file to "Import" filemanager
|
25 |
And I upload "question/format/xml/tests/fixtures/truefalse.xml" file to "Import" filemanager
|
| 23 |
And I press "id_submitbutton"
|
26 |
And I press "id_submitbutton"
|
| 24 |
Then I should see "Parsing questions from import file."
|
27 |
Then I should see "Parsing questions from import file."
|
| Línea 28... |
Línea 31... |
| 28 |
When I press "Continue"
|
31 |
When I press "Continue"
|
| 29 |
Then I should see "Moodle acronym (False)"
|
32 |
Then I should see "Moodle acronym (False)"
|
| 30 |
Then I should see "Moodle acronym (True)"
|
33 |
Then I should see "Moodle acronym (True)"
|
| Línea 31... |
Línea 34... |
| 31 |
|
34 |
|
| 32 |
# Now export again.
|
35 |
# Now export again.
|
| 33 |
When I am on the "Course 1" "core_question > course question export" page logged in as "teacher"
|
36 |
When I am on the "Qbank 1" "core_question > question export" page logged in as "teacher"
|
| 34 |
And I set the field "id_format_xml" to "1"
|
37 |
And I set the field "id_format_xml" to "1"
|
| 35 |
And I set the field "Export category" to "TrueFalse"
|
38 |
And I set the field "Export category" to "TrueFalse"
|
| 36 |
And I press "Export questions to file"
|
39 |
And I press "Export questions to file"
|
| - |
|
40 |
Then following "click here" should download a file that:
|
| - |
|
41 |
| Has mimetype | text/xml |
|
| - |
|
42 |
| Contains text in xml element | Moodle acronym (True) |
|
| Línea 37... |
Línea 43... |
| 37 |
Then following "click here" should download between "57100" and "58150" bytes
|
43 |
| Contains text in xml element | Moodle acronym (False) |
|
| 38 |
|
44 |
|
| 39 |
@javascript @_file_upload
|
45 |
@javascript @_file_upload
|
| 40 |
Scenario: import some multiple choice questions from Moodle XML format
|
46 |
Scenario: import some multiple choice questions from Moodle XML format
|
| 41 |
When I am on the "Course 1" "core_question > course question import" page logged in as "teacher"
|
47 |
When I am on the "Qbank 1" "core_question > question import" page logged in as "teacher"
|
| 42 |
And I set the field "id_format_xml" to "1"
|
48 |
And I set the field "id_format_xml" to "1"
|
| 43 |
And I upload "question/format/xml/tests/fixtures/multichoice.xml" file to "Import" filemanager
|
49 |
And I upload "question/format/xml/tests/fixtures/multichoice.xml" file to "Import" filemanager
|
| 44 |
And I press "id_submitbutton"
|
50 |
And I press "id_submitbutton"
|
| Línea 48... |
Línea 54... |
| 48 |
When I press "Continue"
|
54 |
When I press "Continue"
|
| 49 |
Then I should see "Greeting"
|
55 |
Then I should see "Greeting"
|
| Línea 50... |
Línea 56... |
| 50 |
|
56 |
|
| 51 |
@javascript @_file_upload
|
57 |
@javascript @_file_upload
|
| 52 |
Scenario: import some multi-answer questions from Moodle XML format
|
58 |
Scenario: import some multi-answer questions from Moodle XML format
|
| 53 |
When I am on the "Course 1" "core_question > course question import" page logged in as "teacher"
|
59 |
When I am on the "Qbank 1" "core_question > question import" page logged in as "teacher"
|
| 54 |
And I set the field "id_format_xml" to "1"
|
60 |
And I set the field "id_format_xml" to "1"
|
| 55 |
And I upload "question/format/xml/tests/fixtures/multianswer.xml" file to "Import" filemanager
|
61 |
And I upload "question/format/xml/tests/fixtures/multianswer.xml" file to "Import" filemanager
|
| 56 |
And I press "id_submitbutton"
|
62 |
And I press "id_submitbutton"
|
| 57 |
Then I should see "Parsing questions from import file."
|
63 |
Then I should see "Parsing questions from import file."
|
| Línea 60... |
Línea 66... |
| 60 |
When I press "Continue"
|
66 |
When I press "Continue"
|
| 61 |
Then I should see "cloze with images"
|
67 |
Then I should see "cloze with images"
|
| Línea 62... |
Línea 68... |
| 62 |
|
68 |
|
| 63 |
@javascript @_file_upload
|
69 |
@javascript @_file_upload
|
| 64 |
Scenario: import some questions with legacy-style images from Moodle XML format
|
70 |
Scenario: import some questions with legacy-style images from Moodle XML format
|
| 65 |
When I am on the "Course 1" "core_question > course question import" page logged in as "teacher"
|
71 |
When I am on the "Qbank 1" "core_question > question import" page logged in as "teacher"
|
| 66 |
And I set the field "id_format_xml" to "1"
|
72 |
And I set the field "id_format_xml" to "1"
|
| 67 |
And I upload "question/format/xml/tests/fixtures/sample_questions_with_old_image_tag.xml" file to "Import" filemanager
|
73 |
And I upload "question/format/xml/tests/fixtures/sample_questions_with_old_image_tag.xml" file to "Import" filemanager
|
| 68 |
And I press "id_submitbutton"
|
74 |
And I press "id_submitbutton"
|
| 69 |
Then I should see "Parsing questions from import file."
|
75 |
Then I should see "Parsing questions from import file."
|