[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 @qformat @qformat_xml 2 Feature: Test importing questions from Moodle XML format. 3 In order to reuse questions 4 As an teacher 5 I need to be able to import them in XML format. 6 7 Background: 8 Given the following "courses" exist: 9 | fullname | shortname | format | 10 | Course 1 | C1 | topics | 11 And the following "users" exist: 12 | username | firstname | 13 | teacher | Teacher | 14 And the following "course enrolments" exist: 15 | user | course | role | 16 | teacher | C1 | editingteacher | 17 And I log in as "teacher" 18 And I follow "Course 1" 19 20 @javascript @_file_upload 21 Scenario: import some true/false questions from Moodle XML format 22 When I navigate to "Import" node in "Course administration > Question bank" 23 And I set the field "id_format_xml" to "1" 24 And I upload "question/format/xml/tests/fixtures/truefalse.xml" file to "Import" filemanager 25 And I press "id_submitbutton" 26 Then I should see "Parsing questions from import file." 27 And I should see "Importing 2 questions from file" 28 And I should see "is an acronym for Modular Object-Oriented Dynamic Learning Education" 29 And I should see "is an acronym for Modular Object-Oriented Dynamic Learning Environment" 30 When I press "Continue" 31 Then I should see "Moodle acronym (False)" 32 Then I should see "Moodle acronym (True)" 33 34 # Now export again. 35 And I navigate to "Export" node in "Course administration > Question bank" 36 And I set the field "id_format_xml" to "1" 37 And I press "Export questions to file" 38 And following "click here" should download between "57000" and "58000" bytes 39 40 @javascript @_file_upload 41 Scenario: import some multiple choice questions from Moodle XML format 42 When I navigate to "Import" node in "Course administration > Question bank" 43 And I set the field "id_format_xml" to "1" 44 And I upload "question/format/xml/tests/fixtures/multichoice.xml" file to "Import" filemanager 45 And I press "id_submitbutton" 46 Then I should see "Parsing questions from import file." 47 And I should see "Importing 1 questions from file" 48 And I should see "What language is being spoken?" 49 When I press "Continue" 50 Then I should see "Greeting" 51 52 @javascript @_file_upload 53 Scenario: import some multi-answer questions from Moodle XML format 54 When I navigate to "Import" node in "Course administration > Question bank" 55 And I set the field "id_format_xml" to "1" 56 And I upload "question/format/xml/tests/fixtures/multianswer.xml" file to "Import" filemanager 57 And I press "id_submitbutton" 58 Then I should see "Parsing questions from import file." 59 And I should see "Importing 1 questions from file" 60 And I should see "Match the following cities with the correct state," 61 When I press "Continue" 62 Then I should see "cloze with images" 63 64 @javascript @_file_upload 65 Scenario: import some questions with legacy-style images from Moodle XML format 66 When I navigate to "Import" node in "Course administration > Question bank" 67 And I set the field "id_format_xml" to "1" 68 And I upload "question/format/xml/tests/fixtures/sample_questions_with_old_image_tag.xml" file to "Import" filemanager 69 And I press "id_submitbutton" 70 Then I should see "Parsing questions from import file." 71 And I should see "Importing 2 questions from file" 72 And I should see "This is a multianswer question with an image in the old" 73 And I should see "This is a multichoice question with an image in the old" 74 When I press "Continue" 75 Then I should see "cloze question with image" 76 Then I should see "mcq with image"
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |