You are here: Working with content > Tests > Import and export > Import from file - write questions

Import from file - write questions

itslearning allows you to write your own questions in a text editor. The following section describes each question type and provides examples of how to write the questions. You can write questions for the following question types:

Writing the questions

The questions are written with fairly simple syntax. The example below is from a multiple choice question:

QUESTION;What is the capital of France?;MC;

ALTERNATIVE;London;0;

ALTERNATIVE;Oslo;0;

ALTERNATIVE;Paris;1;

CATEGORY;France

The QUESTION line formulates the question, while the ALTERNATIVE lines formulate the answer alternatives. The CATEGORY line, which decides to which category the question belongs, is optional. Use this question as a template and make your own question. First, open a new document in, for example, Notepad or Textpad, and paste the above code into the document. You can then edit the following information in the question:

Note that you must not remove any semicolons as this will corrupt the question.

Save the document with a .txt extension. You can now try to import the file into a test in itslearning.

Code examples

All the code samples below are stored in this text file. Click to download it. You can import this file to a test.

ClosedMultiple choice
ClosedShort answer
ClosedOpen answer
ClosedMatching
ClosedOrder
ClosedFill in the blank
ClosedSelect from a list