Location: PHPKode > projects > Ps and Qs: Processing QTI using PHP > qti-eb/qtifiles/mixd_imr_101.xml
<?xml version = "1.0" encoding = "UTF-8" standalone = "no"?>
<!DOCTYPE questestinterop SYSTEM "file:///User/qtiexamples/ims_qtiasiv1p2.dtd">

<!-- Draft IMS XML conversion from QML 					-->

<!-- Date:		12th October, 2001     					-->

<!-- Version 1.2 Compliant Example: AdvExampleQML	 	-->

<!-- For demonstration purposes only   					-->

<!-- Question Mark Computing           					-->

<!-- www.questionmark.com              					-->
<questestinterop>
	<!-- ********************************************** -->
	<qticomment><![CDATA[

This is an example of the use of the IMS Question and Test Interoperability XML XML binding
to define question material.

The questions defined here show one of each of the main types currently used in QML, the syntax used
by the Question Mark Perception system, and are taken from example on the Question Mark web site.

You can tryout these questions, complete with scoring and feedback, at :

http://perception.questionmark.com/worldserver/open.dll?SESSION=4971099690083541&NAME=IMS

]]></qticomment>
	<!-- ********************************************** -->
	<item title = "How many players are there in a baseball team?" ident = "QEX1">
		<presentation label = "QEX1">
			<material>
				<mattext texttype = "text/plain">How many players are there in a baseball team?</mattext>
			</material>
			<response_num ident = "QEX1" rcardinality = "Single" rtiming = "No">
				<render_fib fibtype = "Decimal" prompt = "Box" rows = "1" columns = "5" maxchars = "5"/>
			</response_num>
		</presentation>
		<resprocessing>
			<outcomes>
				<decvar/>
			</outcomes>
			<respcondition title = "Right">
				<conditionvar>
					<varequal respident = "QEX1">9</varequal>
				</conditionvar>
				<setvar action = "Set">1</setvar>
				<displayfeedback feedbacktype = "Response" linkrefid = "Right"/>
			</respcondition>
			<respcondition title = "Wrong">
				<conditionvar>
					<other/>
				</conditionvar>
				<setvar action = "Set">0</setvar>
				<displayfeedback feedbacktype = "Response" linkrefid = "Wrong"/>
			</respcondition>
		</resprocessing>
		<itemfeedback ident = "Right" view = "Candidate">
			<material>
				<mattext texttype = "text/plain">That is correct.</mattext>
			</material>
		</itemfeedback>
		<itemfeedback ident = "Wrong" view = "Candidate">
			<material>
				<mattext texttype = "text/plain">No, there are 9 players.</mattext>
			</material>
		</itemfeedback>
	</item>
	<!-- ********************************************** -->
	<item title = "James Bond" ident = "QEX2">
		<presentation label = "QEX2">
			<response_lid ident = "QEX2.1">
				<material>
					<mattext texttype = "text/plain">Which actor starred as James Bond in "License to Kill"?</mattext>
				</material>
				<render_choice shuffle = "Yes">
					<response_label ident = "1">
						<material>
							<mattext texttype = "text/plain">Timothy Dalton</mattext>
						</material>
					</response_label>
					<response_label ident = "2">
						<material>
							<mattext texttype = "text/plain">Pierce Brosnan</mattext>
						</material>
					</response_label>
					<response_label ident = "3">
						<material>
							<mattext texttype = "text/plain">Roger Moore</mattext>
						</material>
					</response_label>
					<response_label ident = "4">
						<material>
							<mattext texttype = "text/plain">Sean Connery</mattext>
						</material>
					</response_label>
				</render_choice>
			</response_lid>
			<response_lid ident = "QEX2.2">
				<material>
					<mattext texttype = "text/plain">Which actor starred as James Bond in "GoldenEye"?</mattext>
				</material>
				<render_choice shuffle = "Yes">
					<response_label ident = "1">
						<material>
							<mattext texttype = "text/plain">Timothy Dalton</mattext>
						</material>
					</response_label>
					<response_label ident = "2">
						<material>
							<mattext texttype = "text/plain">Pierce Brosnan</mattext>
						</material>
					</response_label>
					<response_label ident = "3">
						<material>
							<mattext texttype = "text/plain">Roger Moore</mattext>
						</material>
					</response_label>
					<response_label ident = "4">
						<material>
							<mattext texttype = "text/plain">Sean Connery</mattext>
						</material>
					</response_label>
				</render_choice>
			</response_lid>
			<response_lid ident = "QEX2.3">
				<material>
					<mattext texttype = "text/plain">Which actor starred as James Bond more than any other actor?</mattext>
				</material>
				<render_choice shuffle = "Yes">
					<response_label ident = "1">
						<material>
							<mattext texttype = "text/plain">Timothy Dalton</mattext>
						</material>
					</response_label>
					<response_label ident = "2">
						<material>
							<mattext texttype = "text/plain">Pierce Brosnan</mattext>
						</material>
					</response_label>
					<response_label ident = "3">
						<material>
							<mattext texttype = "text/plain">Roger Moore</mattext>
						</material>
					</response_label>
					<response_label ident = "4">
						<material>
							<mattext texttype = "text/plain">Sean Connery</mattext>
						</material>
					</response_label>
				</render_choice>
			</response_lid>
		</presentation>
		<resprocessing>
			<outcomes>
				<decvar/>
			</outcomes>
			<respcondition title = "Correct">
				<conditionvar>
					<varequal respident = "QEX2.1">1</varequal>
					<varequal respident = "QEX2.2">2</varequal>
					<varequal respident = "QEX2.3">3</varequal>
				</conditionvar>
				<setvar action = "Set">3</setvar>
				<displayfeedback feedbacktype = "Response" linkrefid = "QEX2.Right"/>
			</respcondition>
			<respcondition title = "Other">
				<conditionvar>
					<other/>
				</conditionvar>
				<setvar action = "Set">0</setvar>
				<displayfeedback feedbacktype = "Response" linkrefid = "QEX2.Other"/>
			</respcondition>
		</resprocessing>
		<itemfeedback ident = "QEX2.Right" view = "Candidate">
			<material>
				<mattext texttype = "text/plain">Correct.</mattext>
			</material>
		</itemfeedback>
		<itemfeedback ident = "QEX2.Other" view = "Candidate">
			<material>
				<mattext texttype = "text/plain">No, Timothy Dalton starred in "License to Kill", Pierce Brosnan in "GoldenEye" and Roger Moore has starred in the most James Bond films.</mattext>
			</material>
		</itemfeedback>
	</item>
	<!-- ********************************************** -->
	<item title = "Place the marker at 12 o'clock." ident = "QEX3">
		<presentation label = "QEX3">
			<material>
				<mattext texttype = "text/plain">Place the marker at 12 o'clock.</mattext>
			</material>
			<response_xy ident = "QEX3" rcardinality = "Single" rtiming = "No">
				<render_hotspot>
					<material>
						<matimage x0 = "0" y0 = "0" height = "156" width = "116" imagtype = "image/jpg" uri = "AlarmClock.jpg"/>
					</material>
				</render_hotspot>
			</response_xy>
		</presentation>
		<resprocessing>
			<outcomes>
				<decvar/>
			</outcomes>
			<respcondition title = "Right">
				<conditionvar>
					<varinside respident = "QEX3" areatype = "Rectangle">48,50 67,74</varinside>
				</conditionvar>
				<setvar action = "Set">1</setvar>
				<displayfeedback feedbacktype = "Response" linkrefid = "QEX3.Right"/>
			</respcondition>
			<respcondition title = "Wrong">
				<conditionvar>
					<other/>
				</conditionvar>
				<setvar action = "Set">0</setvar>
				<displayfeedback feedbacktype = "Response" linkrefid = "QEX3.Wrong"/>
			</respcondition>
		</resprocessing>
		<itemfeedback ident = "QEX3.Right" view = "Candidate">
			<material>
				<mattext texttype = "text/plain">Well done.</mattext>
			</material>
		</itemfeedback>
		<itemfeedback ident = "QEX3.Wrong" view = "Candidate">
			<material>
				<mattext texttype = "text/plain">Sorry, you were wrong.</mattext>
			</material>
		</itemfeedback>
	</item>
	<!-- ********************************************** -->
	<item title = "Pulp Fiction" ident = "QEX4">
		<presentation label = "QEX4">
			<material>
				<mattext texttype = "text/plain">The film "Pulp Fiction" was directed by </mattext>
			</material>
			<response_str ident = "QEX4.1" rcardinality = "Single" rtiming = "No">
				<render_fib fibtype = "String" prompt = "Box" rows = "1" columns = "7"/>
			</response_str>
			<response_str ident = "QEX4.2" rcardinality = "Single" rtiming = "No">
				<render_fib fibtype = "String" prompt = "Box" rows = "1" columns = "10"/>
			</response_str>
		</presentation>
		<resprocessing>
			<outcomes>
				<decvar/>
			</outcomes>
			<respcondition title = "Right">
				<conditionvar>
					<varequal respident = "QEX4.1">Quentin</varequal>
					<varequal respident = "QEX4.2">Tarentino</varequal>
				</conditionvar>
				<setvar action = "Set">1</setvar>
				<displayfeedback feedbacktype = "Response" linkrefid = "QEX4.Right"/>
			</respcondition>
			<respcondition title = "Wrong">
				<conditionvar>
					<other/>
				</conditionvar>
				<setvar action = "Set">0</setvar>
				<displayfeedback feedbacktype = "Response" linkrefid = "QEX4.Wrong"/>
			</respcondition>
		</resprocessing>
		<itemfeedback ident = "QEX4.Right" view = "Candidate">
			<material>
				<mattext texttype = "text/plain">Well done.</mattext>
			</material>
		</itemfeedback>
		<itemfeedback ident = "QEX4.Wrong" view = "Candidate">
			<material>
				<mattext texttype = "text/plain">The film "Pulp Fiction" was directed by Quentin Tarentino.</mattext>
			</material>
		</itemfeedback>
	</item>
	<!-- ********************************************** -->
	<item title = "Queen Elizabeth II" ident = "QEX5">
		<presentation label = "TM5">
			<material>
				<mattext texttype = "text/plain">What is the surname of the Queen of England?</mattext>
			</material>
			<response_str ident = "QEX5" rcardinality = "Single" rtiming = "No">
				<render_fib fibtype = "String" prompt = "Box" rows = "1" columns = "20"/>
			</response_str>
		</presentation>
		<resprocessing>
			<outcomes>
				<decvar/>
			</outcomes>
			<respcondition title = "Right">
				<conditionvar>
					<varequal respident = "QEX5">Windsor</varequal>
				</conditionvar>
				<setvar action = "Set">1</setvar>
				<displayfeedback feedbacktype = "Response" linkrefid = "QEX5.Right"/>
			</respcondition>
			<respcondition title = "Wrong">
				<conditionvar>
					<varequal respident = "QEX5">Mountbatten</varequal>
				</conditionvar>
				<setvar action = "Set">0</setvar>
				<displayfeedback feedbacktype = "Response" linkrefid = "QEX5.Wrong"/>
			</respcondition>
			<respcondition title = "Other">
				<conditionvar>
					<other/>
				</conditionvar>
				<setvar action = "Set">0</setvar>
				<displayfeedback feedbacktype = "Response" linkrefid = "QEX5.Other"/>
			</respcondition>
		</resprocessing>
		<itemfeedback ident = "QEX5.Right" view = "Candidate">
			<material>
				<mattext texttype = "text/plain">Well done.</mattext>
			</material>
		</itemfeedback>
		<itemfeedback ident = "QEX5.Wrong" view = "Candidate">
			<material>
				<mattext texttype = "text/plain">It was changed to Windsor.</mattext>
			</material>
		</itemfeedback>
		<itemfeedback ident = "QEX5.Other" view = "Candidate">
			<material>
				<mattext texttype = "text/plain">The correct answer is Windsor.</mattext>
			</material>
		</itemfeedback>
	</item>
	<!-- ********************************************** -->
	<item title = "Solar system" ident = "QEX6">
		<presentation label = "QEX6">
			<response_lid ident = "QEX6.1" rcardinality = "Multiple" rtiming = "No">
				<material>
					<mattext texttype = "text/plain">Which planet is closest to the sun ?</mattext>
				</material>
				<render_choice shuffle = "Yes">
					<response_label ident = "1">
						<material>
							<mattext texttype = "text/plain">Mercury</mattext>
						</material>
					</response_label>
					<response_label ident = "2">
						<material>
							<mattext texttype = "text/plain">Pluto</mattext>
						</material>
					</response_label>
					<response_label ident = "3">
						<material>
							<mattext texttype = "text/plain">Venus</mattext>
						</material>
					</response_label>
				</render_choice>
			</response_lid>
			<response_lid ident = "QEX6.2" rcardinality = "Multiple" rtiming = "No">
				<material>
					<mattext texttype = "text/plain">Which planet is furthest from the sun ?</mattext>
				</material>
				<render_choice shuffle = "Yes">
					<response_label ident = "1">
						<material>
							<mattext texttype = "text/plain">Mercury</mattext>
						</material>
					</response_label>
					<response_label ident = "2">
						<material>
							<mattext texttype = "text/plain">Pluto</mattext>
						</material>
					</response_label>
					<response_label ident = "3">
						<material>
							<mattext texttype = "text/plain">Venus</mattext>
						</material>
					</response_label>
				</render_choice>
			</response_lid>
			<response_lid ident = "QEX6.3" rcardinality = "Multiple" rtiming = "No">
				<material>
					<mattext texttype = "text/plain">Which planet is visible from Earth with the naked eye ?</mattext>
				</material>
				<render_choice shuffle = "Yes">
					<response_label ident = "1">
						<material>
							<mattext texttype = "text/plain">Mercury</mattext>
						</material>
					</response_label>
					<response_label ident = "2">
						<material>
							<mattext texttype = "text/plain">Pluto</mattext>
						</material>
					</response_label>
					<response_label ident = "3">
						<material>
							<mattext texttype = "text/plain">Venus</mattext>
						</material>
					</response_label>
				</render_choice>
			</response_lid>
		</presentation>
		<resprocessing>
			<outcomes>
				<decvar/>
			</outcomes>
			<respcondition title = "Right">
				<conditionvar>
					<varequal respident = "QEX6.1">1</varequal>
					<varequal respident = "QEX6.2">2</varequal>
					<varequal respident = "QEX6.3">3</varequal>
				</conditionvar>
				<setvar action = "Set">1</setvar>
				<displayfeedback feedbacktype = "Response" linkrefid = "QEX6.Right"/>
			</respcondition>
			<respcondition title = "Wrong">
				<conditionvar>
					<other/>
				</conditionvar>
				<setvar action = "Set">0</setvar>
				<displayfeedback feedbacktype = "Response" linkrefid = "QEX6.Wrong"/>
			</respcondition>
		</resprocessing>
		<itemfeedback ident = "QEX6.Right" view = "Candidate">
			<material>
				<mattext texttype = "text/plain">You're correct.</mattext>
			</material>
		</itemfeedback>
		<itemfeedback ident = "QEX6.Wrong" view = "Candidate">
			<material>
				<mattext texttype = "text/plain">Mercury is the closest to the sun, Pluto is the furthest away and Venus can be seen with the naked eye.</mattext>
			</material>
		</itemfeedback>
	</item>
	<!-- ********************************************** -->
	<item title = "The Untouchables" ident = "QEX7">
		<presentation label = "QEX7">
			<material>
				<mattext texttype = "text/plain">Select the actors who appeared in "The Untouchables".</mattext>
			</material>
			<response_lid ident = "QEX7" rcardinality = "Multiple" rtiming = "No">
				<render_choice shuffle = "Yes">
					<response_label ident = "1">
						<material>
							<mattext texttype = "text/plain">Al Pacino</mattext>
						</material>
					</response_label>
					<response_label ident = "2">
						<material>
							<mattext texttype = "text/plain">Harrison Ford</mattext>
						</material>
					</response_label>
					<response_label ident = "3">
						<material>
							<mattext texttype = "text/plain">Andy Garcia</mattext>
						</material>
					</response_label>
					<response_label ident = "4">
						<material>
							<mattext texttype = "text/plain">Martin Sheen</mattext>
						</material>
					</response_label>
					<response_label ident = "5">
						<material>
							<mattext texttype = "text/plain">Sean Connery</mattext>
						</material>
					</response_label>
					<response_label ident = "6">
						<material>
							<mattext texttype = "text/plain">Kevin Costner</mattext>
						</material>
					</response_label>
				</render_choice>
			</response_lid>
		</presentation>
		<resprocessing>
			<outcomes>
				<decvar/>
			</outcomes>
			<respcondition title = "Right">
				<conditionvar>
					<varequal respident = "QEX7">5</varequal>
					<varequal respident = "QEX7">3</varequal>
					<varequal respident = "QEX7">6</varequal>
					<not>
						<varequal respident = "QEX7">1</varequal>
					</not>
					<not>
						<varequal respident = "QEX7">2</varequal>
					</not>
					<not>
						<varequal respident = "QEX7">4</varequal>
					</not>
				</conditionvar>
				<setvar action = "Set">1</setvar>
				<displayfeedback feedbacktype = "Response" linkrefid = "QEX7.Right"/>
			</respcondition>
			<respcondition title = "Wrong">
				<conditionvar>
					<other/>
				</conditionvar>
				<setvar action = "Set">0</setvar>
				<displayfeedback feedbacktype = "Response" linkrefid = "QEX7.Wrong"/>
			</respcondition>
		</resprocessing>
		<itemfeedback ident = "QEX7.Right" view = "Candidate">
			<material>
				<mattext texttype = "text/plain">Yes, that's right.</mattext>
			</material>
		</itemfeedback>
		<itemfeedback ident = "QEX7.Wrong" view = "Candidate">
			<material>
				<mattext texttype = "text/plain">No, Sean Connery, Kevin Costner and Andy Garcia is the correct answer.</mattext>
			</material>
		</itemfeedback>
	</item>
	<!-- ********************************************** -->
	<item title = "What is the capital city of the Philipines?" ident = "QEX8">
		<presentation label = "QEX8">
			<material>
				<mattext texttype = "text/plain">What is the capital city of the Philippines?</mattext>
			</material>
			<response_lid ident = "QEX8" rcardinality = "Single" rtiming = "No">
				<render_choice shuffle = "Yes">
					<response_label ident = "1">
						<material>
							<mattext texttype = "text/plain">Taipei</mattext>
						</material>
					</response_label>
					<response_label ident = "2">
						<material>
							<mattext texttype = "text/plain">Jakarta</mattext>
						</material>
					</response_label>
					<response_label ident = "3">
						<material>
							<mattext texttype = "text/plain">Manila</mattext>
						</material>
					</response_label>
					<response_label ident = "4">
						<material>
							<mattext texttype = "text/plain">Seoul</mattext>
						</material>
					</response_label>
				</render_choice>
			</response_lid>
		</presentation>
		<resprocessing>
			<outcomes>
				<decvar/>
			</outcomes>
			<respcondition title = "QEX8.Right">
				<conditionvar>
					<varequal respident = "QEX8">3</varequal>
				</conditionvar>
				<setvar action = "Set">1</setvar>
				<displayfeedback feedbacktype = "Response" linkrefid = "QEX8.Right"/>
			</respcondition>
			<respcondition title = "QEX8.Wrong">
				<conditionvar>
					<other/>
				</conditionvar>
				<setvar action = "Set">0</setvar>
				<displayfeedback feedbacktype = "Response" linkrefid = "QEX8.Wrong"/>
			</respcondition>
		</resprocessing>
		<itemfeedback ident = "QEX8.Right" view = "Candidate">
			<material>
				<mattext texttype = "text/plain">Yes, Manila is the capital.</mattext>
			</material>
		</itemfeedback>
		<itemfeedback ident = "QEX8.Wrong" view = "Candidate">
			<material>
				<mattext texttype = "text/plain">No, Manila is the capital.</mattext>
			</material>
		</itemfeedback>
	</item>
</questestinterop>
Return current item: Ps and Qs: Processing QTI using PHP