Import questions: Difference between revisions

From MoodleDocs
No edit summary
 
(90 intermediate revisions by 28 users not shown)
Line 1: Line 1:
{{Questions}}
{{Managing questions}}
 
Moodle has a number of different formats that can be used to '''import questions''' into [[Question bank]] categories and as [[Adding a question page|lesson question pages]]. These include some proprietary quiz software formats, as well as text files and Moodle formats.  
Moodle has a number of different formats that can be used to import questions into [[Question bank]] categories and as [[Adding a question page|lesson question pages]]. These include some proprietary quiz software formats, as well as text files and Moodle formats.
 
==Importing questions from an existing file==
==Importing questions from an existing file==
It is possible to import questions from a file on your network/computer or from a file that has been saved or uploaded into your course files. The underlying [[Import questions#Character encoding|character encoding]] of this file is important.


In order to import questions in any format, you first need to create a quiz activity in your course. Fill in the form for the activity and then choose [Save and display]. Choose [edit] on the following page. You will then see an option [Import] which leads you where you want to go.
Note: Moodle XML format is the recommended import question type format as it enables the maximum amount of question data (such as question feedback) to be imported.
=== Question bank import process ===
The question bank allows you a great deal of flexibility when importing questions. To import questions into Moodle's [[Question bank]], use the Questions link in the course administration and select the import option. In most versions of Moodle it is also possible to get to this screen (produced by ../question/import.php) while editing an existing quiz.
[[Image:QuizQuestionImport.png|thumb|center|Import question formats from the import tab]].
*Select import tab
*Select the question type to import
*General: pick the category, determine if the context and category information that maybe contained in a GIFT or XML file should be used.
*Select what should happen if there are no grades or an error is detected in the import process.
*Determine the file to import
**Import from file upload. Use the browse function to import a file from your computer. Use the "Upload this file" button to import the questions.
**Import from file already in course files. A popup window will take you to the course files start page. Use the "Import from this file" button.
[[Image:Question bank import file gen import 1.png|thumb|center|General and import file parameters sections]]
===Lesson module process===
The question types that can be imported from the Quiz questions bank into a lesson are the following:
Matching, Multichoice, Numerical, Short answer, True/false, Essay.


The Description and Cloze questions can '''not''' be imported from Quiz questions bank into a lesson
[[Image:lessonquestionimport.png|thumb|center|Lesson screen asking which file type will be imported]]
[[Lesson module|Lesson]] can only import from a file located on the teachers computer.
*In edit, using the expanded view
*Select the position where questions should be inserted into the lesson
*Click on the Import question link between the pages.
*Select the file type
*Use the browse function to find the file on your computer
*Import the selected file.
==Question import formats==
==Question import formats==
 
=== [[GIFT]] ===
=== [[GIFT]] ===  
Moodle 'proprietary' text format for import and export. Reasonably comprehensive.
Moodle 'proprietary' text format for import and export. Reasonably comprehensive.


=== [[Moodle XML]] ===
The [https://moodle.org/plugins/pluginversions.php?plugin=qformat_giftmedia GIFT with medias optional plugin] is an import format similar to Gift and uses the same syntax, but instead of a text file it imports a zip file containing the gift text file and media files (images, sounds, ...). To learn how to include the medias into your questions, read [[Gift with medias format]]
=== [[Moodle XML format|Moodle XML]] ===
Moodle 'proprietary' xml format for import and export. Very comprehensive.
Moodle 'proprietary' xml format for import and export. Very comprehensive.
====How do you create XML files to enable import of images?====
Discussion: http://moodle.org/mod/forum/discuss.php?d=181211
=====OPTION 1=====
Check out http://www.slideshare.net/tjuly/adding-images-to-moodle-quiz-and-import-via-xml
This describes a use of a text to XML conversion process using http://vletools.com/questions/quiz


=== [[Aiken]] ===  
Please add any further comments here:
=====OPTION 2=====
=== [[Aiken]] ===
This format is an easy way of writing multiple-choice questions for import.
This format is an easy way of writing multiple-choice questions for import.
=== Blackboard ===
It's possible to import both .dat files containing just questions text or zip archives containing questions and associated medias (images, sounds, ...).


=== AON ===
If your questions contains images they are imported too.
This format is the same as the missing word format, except it creates matching questions from the multiple choice questions. Please note that from Moodle 1.8 it will no longer be part of the standard Moodle.


=== Blackboard ===
Also both Blackboard POOL and QTI files are supported.
From Moodle 1.7 onwards, if you're converting from Blackboard to Moodle, you can export your course and then import the question pools into Moodle using the Blackboard "POOL" type export format. It relies on XML functions being compiled into your PHP. Note that you must first unpack the exported zip file and provide Moodle with the appropriate .dat file. Note that this version does not work with Blackboard Version 6 and newer. (Use this format for ExamView 5 or 6)


=== Blackboard V6+ ===
Questions produced with TestGen and Examview software and saved as Blackboard files are imported.
This module can import questions saved in Blackboard's export format. It provides limited support for Blackboard Version 6 and 7. It relies on XML functions being compiled into your PHP. You must upload the zip file exported from Blackboard.


=== [[WebCT format]] ===
If the zip archives contains several resources files all questions from all files are imported. "Undeployed" Blackboard quiz are also supported.
This format supports importing multiple choice and short answers questions from WebCT's text format.


=== Course Test Manager ===
Follow these steps to import questions:
This format enables you to import questions from the Course Test Manager from Course Technology.


=== Embedded Answers (Cloze) ===
1. Create a quiz with questions in Examview Test Generator v. 6.2.1 or another question generator able to save questions as Blackboard files like TestGen.
This format is a multiple question, multiple answer question with embedded answers. They can be a bit tricky to develop, but they are a unique way of asking questions.


=== Examview ===
2. Export the quiz to Blackboard 6.0-7.0 format.
ExamView 4 supported an XML export format that Moodle can import. If you are using a newer version of ExamView, you should export using Blackboard, extract the zip archive ExamView creates, then import in Moodle using Blackboard format (do not use 6+ format for moodle import, even though exam view calls this a Blackboard6+ file--it isn't). You can choose one of the ".dat" files from the ExamView archive to import.  Note that images are not currently imported.


Any questions that included images must be edited to "re-link" those images. The image files can be found in the file folder that is in your item test bank directory of your course files. Click the edit tool next to a question in the question list.  If one or more images files are included in the question, you should see a placeholder with the image file name in it embedded with text in the text edit window.  Click on the placeholder and then click on the insert image tool of the text editor.  Navigate to the folder containing the image files. (It will be in the folder you uploaded the zipped question bank to).  Find the file with the same name as indicated in the image placeholder.  Type the alternate text then click "okay" to re-link the image.  Click on "okay" to return to the question list.  
3. From the ''Settings'' tab for your course choose ''Question bank'' and then ''Import''. Make sure you use the Blackboard format.


See http://www.rose-prism.org/moodle/mod/resource/view.php?id=6788 and http://www.rose-prism.org/moodle/mod/forum/discuss.php?d=1451
'''NOTE:''' Some tutorials on the web explain that you need to edit files to re-link images. '''This is no more needed'''. Images are imported without any editing.
==== Importing questions in different categories ====
If you check the "Get category from file" option during import, the category name for each resource file will be extracted for the resource file and created if necessary.


== Question bank process ==
If "Get category from file" is unchecked, all questions will be imported in the current category.
The question bank allows you a great deal of flexibility when importing questions. It is possible to import questions from a file on your network/computer or from a file that has been saved or uploaded into your course files.
=== Course Test Manager ===
This format enables you to import questions from the Course Test Manager from Course Technology.
=== [[Embedded Answers (Cloze) question type|Embedded Answers (Cloze)]] ===
This format is a multiple question, multiple answer question with embedded answers. They can be a bit tricky to develop, but they are a unique way of asking questions.
===H5P===
H5P interactive content type can contain questions similar to standard Moodle questions. The [[H5P content types format]] allows users to upload an H5P file and add questions contained in the file to the question bank. This is a contributed plugin that needs to be installed.
===[[Hot Potatoes]]===
A freeware program that can export questions into Moodle. In order to import Hot Potatoes questions into a Moodle quiz, the administrator must first install the [https://moodle.org/plugins/view.php?plugin=mod_hotpot Hotpot module] and the [https://moodle.org/plugins/view.php?plugin=qformat_hotpot Hotpot question import]
----
'''Note 1'''.- All types of Hot Potatoes question types can be imported into Moodle, but ''JCross'' and ''JMix'' questions will be changed to Short Answer questions.
*Can be imported into the ''Quiz questions'' bank:
**Cloze questions (''JCloze'');
**Match questions (''JMatch'');
**Multiple Choice questions (''JQuiz'')
**Short Answer questions (''JQuiz'', ''JCross'' and ''JMix'')


*Select import tab
*Can be imported into Moodle's ''Lesson'' module:
*Select the question type to import
**Match questions (''JMatch'');
*General: pick the category, determine if the context and category information that maybe contained in the file should be used. Select what should happen if there are no grades or an error is detected in the import process.
**Multiple Choice questions (''JQuiz'')
*Determine the file to import and import it
'''Note 2'''.- For Hot Potatoes' Multiple Choice question type (''JQuiz''), the ''Multiple-choice'' ''Short answer'' and ''Multi-select'' question-type will imported as they are. ''Hybrid'' questions will be imported as ''MultiChoice'' questions, i.e. they will not start as Short Answer questions and then change to Multiple Choice questions after several wrong responses.
**Import from file upload.  Use the browse function to import a file from your computer. Use the "Upload this file" button to import the questions.
===[[Missing word question format|Missing word]]===
**Import from file already in course files. A popup window will take you to the course files start page. Use the "Import from this file" button.
This format is only used for multiple choice questions and short answer questions, similar to GIFT.


[[Image:Question bank import file gen import 1.png|thumb|center|General and import file parameters sections]]
More information on the [[Missing word question format]] page.
 
=== [[Word table format]] ===
==Lesson module process==
This format supports importing all question types (except calculated) from structured tables in Microsoft Word files.
The question types that can be imported into a lesson are similar to question bank.
Creating, editing and managing large numbers of questions is much easier in an external Word file than maintaining them one at a time inside Moodle.
[[Image:Lesson Import question types.png|thumb|center|Lesson screen asking which file type will be imported]]
Find out about how this tools work on the [https://docs.moodle.org/403/en/Word_table_format Word table format page].
 
[[Lesson module|Lesson]] can only import from a file located on the teachers computer.
*In edit, using the expanded view
*Select the position where questions should be inserted into the lesson
*Click on the Import question link between the pages.
*Select the file type
*Use the browse function to find the file on your computer
*Import the selected file.


This is a contributed plugin, so must be installed separately to Moodle and is available in the Moodle Plugins Directory at [http://moodle.org/plugins/view.php?plugin=qformat_wordtable  Moodle2Word Word table import/export].
==Importing from other programs==
=== Diploma 6 ===
Diploma 6 also supports an XML export format that Moodle can import. If you are using a newer version of Diploma, here are the steps to export from Diploma and import to Moodle. The steps are the same as those for Blackboard(see above).
*Export from Diploma with the Blackboard LS 6.0 – 6.2 format.
*Import the .zip file using the Blackboard format. The images are imported at the same time.
===Old formats===
*AON -This format is the same as the missing word format, except it creates matching questions from the multiple choice questions. Please note that from Moodle 1.8 it will no longer be part of the standard Moodle.
== Character encoding ==
== Character encoding ==
It is important that the imported file is encoded in the [http://en.wikipedia.org/wiki/UTF-8 UTF-8] standard.
It is important that the imported file is encoded in the [http://en.wikipedia.org/wiki/UTF-8 UTF-8] standard.


If this is not adhered to you may get import errors and/or strange characters in the imported materials. If the file is not UTF-8, an external tool must be used to change the encoding. Note that if only basic 'latin' characters are used, then the coding issue can generally be ignored. Be particularly careful when creating questions using Microsoft Word. For reasons best known to themselves, Microsoft used their own encoding for some characters (incompatible with UTF-8) and this is likely to break the import.
If this is not adhered to you may get import errors and/or strange characters in the imported materials. If the file is not UTF-8, an external tool must be used to change the encoding. Note that if only basic 'latin' characters are used, then the coding issue can generally be ignored. Be particularly careful when creating questions using Microsoft Word. For reasons best known to themselves, Microsoft used their own encoding for some characters (incompatible with UTF-8) and this is likely to break the import.
:''Note:''If you are having problems with the first question (or category modifier) in the file being misinterpreted (this particularly applies to GIFT format) it might be your editor adding a "Byte-Order-Mark" character at the beginning of the file. This is particularly common in Windows programs (e.g. Notepad) and is another good reason to steer clear of Microsoft products for text editing (as apposed to word processing). There are plenty of free or low cost text editors available for download. The BOM is neither recommended or required as UTF8 does not have [http://en.wikipedia.org/wiki/Byte-order_mark byte order issues].
==Match grades==
Imported grades must '''exactly''' match one of the fixed list of valid grades, as follows:
100, 90, 80, 75, 70, 66.666, 60, 50, 40, 33.333, 30, 25, 20, 16.666, 14.2857, 12.5, 11.111, 10, 5, 0
negative values of the above list are also permitted.


:''Note:'' Prior to Moodle 1.6 the question file was assumed to be encoded in the same way as the language being used within the Moodle site. With Moodle 1.6 and onwards the imported file must be encoded in UTF-8.
There are two settings for this switch. They affect how the import routine treats values that do not exactly match one of the values in the above list
 
* Error if grade not listed - If a question contains any grades not found in the list an error is displayed and that question will not be imported.
* Nearest grade if not listed - If a grade is found that does not match a value in the list, the grade is changed to the closest matching value in the list
Note: some custom import formats write directly to the database and may bypass this check.
==Importing questions from Moodle.net==
* Visit [https://moodle.net/mod/data/view.php?d=1&mode=list&perpage=10&search=&sort=0&order=DESC&advanced=0&filter=1&advanced=1&f_2=Quiz+questions&f_11=&f_13=&f_12=&f_9=&f_8= Moodle.net] to import questions from other Moodler's courses (computing, chemistry, engineering, mathematics, grammar...).
==Tips and tricks==
==Tips and tricks==
*''TIP:'' It may be easier and faster to type many questions into a '''single text file''', than to create a series of Quiz or Lesson question pages. Some teachers report that once they master creating questions in one of the formats to import, they do not have to wait for their Moodle site screen to refresh and the process of selecting the next question type to create.  
*''TIP:'' It may be easier and faster to type many questions into a '''single text file''', than to create a series of Quiz or Lesson question pages. Some teachers report that once they master creating questions in one of the formats to import, they do not have to wait for their Moodle site screen to refresh and the process of selecting the next question type to create.
*''TIP:'' Want to use questions from your quiz in a '''Lesson'''? Export the question category in say a GIFT format, then use a text editor to delete questions, or perhaps use a search and replace function to change names or places.
*''TIP:'' Want to use questions from your quiz in a '''Lesson'''? Export the question category in say a GIFT format, then use a text editor to delete questions, or perhaps use a search and replace function to change names or places.
 
== See also ==
== See also ==
* The help button link next to the import file button gives a lot of detail about each format in a popup window.
* The help button link next to the import file button gives a lot of detail about each format in a popup window.
* Using Moodle [http://moodle.org/mod/forum/discuss.php?d=51316 escaping problem in gift import?] forum discussion
* [[Converting files to UTF-8]]
* [[Converting files to UTF-8]]
* [[Import and export FAQ]]
* [[Import and export FAQ]]
 
* [http://www.moodle2word.net website for converting Moodle Questions into tables in a Microsoft Word file, and vice versa].
* [https://sites.google.com/site/cq4mgenerator/home Calculated Question for Moodle Generator] website that describes the use of a spreadsheet to generate Calculated Questions using all mathematical functions, a tool that empowers teachers to quickly design large question banks with calculated questions.
[[Category:Questions]]
[[de:Fragen importieren]]
[[es:Importar preguntas]]
[[eu:Galderak inportatu]]
[[fr:Importer des questions]]
[[fr:Importer des questions]]
[[ja:問題のインポート]]
[[ja:問題のインポート]]
[[de:Fragen importieren]]

Latest revision as of 14:11, 11 August 2023

Moodle has a number of different formats that can be used to import questions into Question bank categories and as lesson question pages. These include some proprietary quiz software formats, as well as text files and Moodle formats.

Importing questions from an existing file

It is possible to import questions from a file on your network/computer or from a file that has been saved or uploaded into your course files. The underlying character encoding of this file is important.

Note: Moodle XML format is the recommended import question type format as it enables the maximum amount of question data (such as question feedback) to be imported.

Question bank import process

The question bank allows you a great deal of flexibility when importing questions. To import questions into Moodle's Question bank, use the Questions link in the course administration and select the import option. In most versions of Moodle it is also possible to get to this screen (produced by ../question/import.php) while editing an existing quiz.

Import question formats from the import tab

.

  • Select import tab
  • Select the question type to import
  • General: pick the category, determine if the context and category information that maybe contained in a GIFT or XML file should be used.
  • Select what should happen if there are no grades or an error is detected in the import process.
  • Determine the file to import
    • Import from file upload. Use the browse function to import a file from your computer. Use the "Upload this file" button to import the questions.
    • Import from file already in course files. A popup window will take you to the course files start page. Use the "Import from this file" button.
General and import file parameters sections

Lesson module process

The question types that can be imported from the Quiz questions bank into a lesson are the following: Matching, Multichoice, Numerical, Short answer, True/false, Essay.

The Description and Cloze questions can not be imported from Quiz questions bank into a lesson

Lesson screen asking which file type will be imported

Lesson can only import from a file located on the teachers computer.

  • In edit, using the expanded view
  • Select the position where questions should be inserted into the lesson
  • Click on the Import question link between the pages.
  • Select the file type
  • Use the browse function to find the file on your computer
  • Import the selected file.

Question import formats

GIFT

Moodle 'proprietary' text format for import and export. Reasonably comprehensive.

The GIFT with medias optional plugin is an import format similar to Gift and uses the same syntax, but instead of a text file it imports a zip file containing the gift text file and media files (images, sounds, ...). To learn how to include the medias into your questions, read Gift with medias format

Moodle XML

Moodle 'proprietary' xml format for import and export. Very comprehensive.

How do you create XML files to enable import of images?

Discussion: http://moodle.org/mod/forum/discuss.php?d=181211

OPTION 1

Check out http://www.slideshare.net/tjuly/adding-images-to-moodle-quiz-and-import-via-xml

This describes a use of a text to XML conversion process using http://vletools.com/questions/quiz

Please add any further comments here:

OPTION 2

Aiken

This format is an easy way of writing multiple-choice questions for import.

Blackboard

It's possible to import both .dat files containing just questions text or zip archives containing questions and associated medias (images, sounds, ...).

If your questions contains images they are imported too.

Also both Blackboard POOL and QTI files are supported.

Questions produced with TestGen and Examview software and saved as Blackboard files are imported.

If the zip archives contains several resources files all questions from all files are imported. "Undeployed" Blackboard quiz are also supported.

Follow these steps to import questions:

1. Create a quiz with questions in Examview Test Generator v. 6.2.1 or another question generator able to save questions as Blackboard files like TestGen.

2. Export the quiz to Blackboard 6.0-7.0 format.

3. From the Settings tab for your course choose Question bank and then Import. Make sure you use the Blackboard format.

NOTE: Some tutorials on the web explain that you need to edit files to re-link images. This is no more needed. Images are imported without any editing.

Importing questions in different categories

If you check the "Get category from file" option during import, the category name for each resource file will be extracted for the resource file and created if necessary.

If "Get category from file" is unchecked, all questions will be imported in the current category.

Course Test Manager

This format enables you to import questions from the Course Test Manager from Course Technology.

Embedded Answers (Cloze)

This format is a multiple question, multiple answer question with embedded answers. They can be a bit tricky to develop, but they are a unique way of asking questions.

H5P

H5P interactive content type can contain questions similar to standard Moodle questions. The H5P content types format allows users to upload an H5P file and add questions contained in the file to the question bank. This is a contributed plugin that needs to be installed.

Hot Potatoes

A freeware program that can export questions into Moodle. In order to import Hot Potatoes questions into a Moodle quiz, the administrator must first install the Hotpot module and the Hotpot question import


Note 1.- All types of Hot Potatoes question types can be imported into Moodle, but JCross and JMix questions will be changed to Short Answer questions.

  • Can be imported into the Quiz questions bank:
    • Cloze questions (JCloze);
    • Match questions (JMatch);
    • Multiple Choice questions (JQuiz)
    • Short Answer questions (JQuiz, JCross and JMix)
  • Can be imported into Moodle's Lesson module:
    • Match questions (JMatch);
    • Multiple Choice questions (JQuiz)

Note 2.- For Hot Potatoes' Multiple Choice question type (JQuiz), the Multiple-choice Short answer and Multi-select question-type will imported as they are. Hybrid questions will be imported as MultiChoice questions, i.e. they will not start as Short Answer questions and then change to Multiple Choice questions after several wrong responses.

Missing word

This format is only used for multiple choice questions and short answer questions, similar to GIFT.

More information on the Missing word question format page.

Word table format

This format supports importing all question types (except calculated) from structured tables in Microsoft Word files. Creating, editing and managing large numbers of questions is much easier in an external Word file than maintaining them one at a time inside Moodle. Find out about how this tools work on the Word table format page.

This is a contributed plugin, so must be installed separately to Moodle and is available in the Moodle Plugins Directory at Moodle2Word Word table import/export.

Importing from other programs

Diploma 6

Diploma 6 also supports an XML export format that Moodle can import. If you are using a newer version of Diploma, here are the steps to export from Diploma and import to Moodle. The steps are the same as those for Blackboard(see above).

  • Export from Diploma with the Blackboard LS 6.0 – 6.2 format.
  • Import the .zip file using the Blackboard format. The images are imported at the same time.

Old formats

  • AON -This format is the same as the missing word format, except it creates matching questions from the multiple choice questions. Please note that from Moodle 1.8 it will no longer be part of the standard Moodle.

Character encoding

It is important that the imported file is encoded in the UTF-8 standard.

If this is not adhered to you may get import errors and/or strange characters in the imported materials. If the file is not UTF-8, an external tool must be used to change the encoding. Note that if only basic 'latin' characters are used, then the coding issue can generally be ignored. Be particularly careful when creating questions using Microsoft Word. For reasons best known to themselves, Microsoft used their own encoding for some characters (incompatible with UTF-8) and this is likely to break the import.

Note:If you are having problems with the first question (or category modifier) in the file being misinterpreted (this particularly applies to GIFT format) it might be your editor adding a "Byte-Order-Mark" character at the beginning of the file. This is particularly common in Windows programs (e.g. Notepad) and is another good reason to steer clear of Microsoft products for text editing (as apposed to word processing). There are plenty of free or low cost text editors available for download. The BOM is neither recommended or required as UTF8 does not have byte order issues.

Match grades

Imported grades must exactly match one of the fixed list of valid grades, as follows:

100, 90, 80, 75, 70, 66.666, 60, 50, 40, 33.333, 30, 25, 20, 16.666, 14.2857, 12.5, 11.111, 10, 5, 0

negative values of the above list are also permitted.

There are two settings for this switch. They affect how the import routine treats values that do not exactly match one of the values in the above list

  • Error if grade not listed - If a question contains any grades not found in the list an error is displayed and that question will not be imported.
  • Nearest grade if not listed - If a grade is found that does not match a value in the list, the grade is changed to the closest matching value in the list

Note: some custom import formats write directly to the database and may bypass this check.

Importing questions from Moodle.net

  • Visit Moodle.net to import questions from other Moodler's courses (computing, chemistry, engineering, mathematics, grammar...).

Tips and tricks

  • TIP: It may be easier and faster to type many questions into a single text file, than to create a series of Quiz or Lesson question pages. Some teachers report that once they master creating questions in one of the formats to import, they do not have to wait for their Moodle site screen to refresh and the process of selecting the next question type to create.
  • TIP: Want to use questions from your quiz in a Lesson? Export the question category in say a GIFT format, then use a text editor to delete questions, or perhaps use a search and replace function to change names or places.

See also