ImportQuestion

Applies to the following products: 
Questionmark OnDemand
Questionmark Perception
Questionmark OnPremise
Applies to the following Perception versions: 
Perception 5.7

This method imports question into the Perception database. The XML data that is passed to Perception needs to be wrapped in the CDATA tags to ensure it does not interfere with the SOAP input. For example,

<![CDATA[DATA GOES HERE]>

This method, at present, only supports the importing of question XML that are in the QML format. The type of XML data supplied can be identified to the method using the XMLType parameter.

The following is an example question presented in QML that can be imported into Perception using this method:

<?xml version="1.0" standalone="no"?> <!DOCTYPE QML SYSTEM "QML_V3.dtd"> <QML> <QUESTION ID="6276246054177735" DESCRIPTION="A 60 kg dancer applies a horizontal force of -800 N on the dance floor. The dancer's acceleration will be:" TOPIC="Mechanical and Biomechanical Mathematics" STATUS="Normal"> <CONTENT TYPE="text/html"><![CDATA[A 60 kg dancer applies a horizontal force of -800 N on the dance floor. The dancer's acceleration will be:<br />]]></CONTENT> <ANSWER QTYPE="MC" SHUFFLE="YES"> <CHOICE ID="A"> <CONTENT TYPE="text/html"><![CDATA[-7.5 m s<SUP>-2</SUP>]]></CONTENT> </CHOICE> <CHOICE ID="B"> <CONTENT TYPE="text/html"><![CDATA[7.5 m s<SUP>-2</SUP>]]></CONTENT> </CHOICE> <CHOICE ID="C"> <CONTENT TYPE="text/html"><![CDATA[-13.33 m s<SUP>-2</SUP>]]></CONTENT> </CHOICE> <CHOICE ID="D"> <CONTENT TYPE="text/html"><![CDATA[13.33 m s<SUP>-2</SUP>]]></CONTENT> </CHOICE> <CHOICE ID="E"> <CONTENT TYPE="text/html"><![CDATA[Need more information to calculate]]></CONTENT> </CHOICE> </ANSWER> <OUTCOME ID="0 -7.5 m s-2" SCORE="0"> <CONDITION>"A"</CONDITION> <CONTENT TYPE="text/html"><![CDATA[Wrong answer. Consider looking at Force, mass, and acceleration and Newton's 2nd Law of Motion.]]></CONTENT> </OUTCOME> <OUTCOME ID="1 7.5 m s-2" SCORE="0"> <CONDITION>"B"</CONDITION> <CONTENT TYPE="text/html"><![CDATA[Wrong answer. Consider looking at Force, mass, and acceleration and Newton's 2nd Law of Motion.]]></CONTENT> </OUTCOME> <OUTCOME ID="2 -13.33 m s-2" SCORE="0"> <CONDITION>"C"</CONDITION> <CONTENT TYPE="text/html"><![CDATA[Wrong answer. Consider looking at Force, mass, and acceleration and Newton's 2nd Law of Motion.]]></CONTENT> </OUTCOME> <OUTCOME ID="3 13.33 m s-2" SCORE="1"> <CONDITION>"D"</CONDITION> <CONTENT TYPE="text/html"><![CDATA[Correct answer; well done.]]></CONTENT> </OUTCOME> <OUTCOME ID="4 Need more information to calculate" SCORE="0"> <CONDITION>"E"</CONDITION> <CONTENT TYPE="text/html"><![CDATA[Wrong answer. All of the information needed is present.]]></CONTENT> </OUTCOME> </QUESTION> </QML>

For further information about QML, please refer to the following Knowledge Base article:

What is Question Markup Language (QML)?

 

Available in:
  • Version 5.1 +

Parameter

Input name Description Data type Optional field?

XML

The XML of the QML that is imported in to Perception

String

N

Comment

Comments to be added to database regarding the question being imported

String

Y

Author

The author that created the question

String

N

TestImport

Determines whether the import should be tested to ensure it is in the correct format and has the required information necessary

Boolean

N

XMLType

0 - Question to import is XML data in the format of QML

1 - Not supported

Integer

N

IRTA

Item Response Theory settings to apply to the imported question

Double

N

IRTB

Item Response Theory settings to apply to the imported question

Double

N

IRTC

Item Response Theory settings to apply to the imported question

Double

N

Difficulty

The difficulty setting to apply to the imported question

Double

N

Discrimination

The discrimination setting to apply to the imported question

Double

N

Angoff

Angoff settings to apply to the question that is imported

Double

N

Language

The language of the question being imported

String

Y

Response

Output name Description Data type

IsImported

Confirms if the question has been successfully imported

Boolean

ImportMessage

A message describing the error that has occurred if IsImported = false.

String

QuestionId

The Question_ID of the content imported

String

Content

Display the first <CONTENT> item included in the imported QML if the import was successful.

String

Troubleshooting

Please refer to the following page for any error codes that are displayed when using this method.

Appendix - Error codes