Location: PHPKode > projects > Ps and Qs: Processing QTI using PHP > qti-eb/qtifiles/basic_electronics_01_qti_1_.xml
<?xml version = "1.0" encoding = "UTF-8" standalone = "no"?>
<!DOCTYPE questestinterop SYSTEM "ims_qtiasiv1p2.dtd">
<questestinterop>  
	<item title = "Component use 1" ident = "NSFB_electronics_01_v1p2">    
		<presentation>      
			<material>        
				<mattext>Which electronic component allows alternating current (AC) to flow but prevents direct current (DC) flowing?</mattext>      
			</material>      
			<response_lid ident = "MC_01" rcardinality = "Single" rtiming = "No">        
				<render_choice shuffle = "Yes">          
					<response_label ident = "A">            
						<material>              
							<mattext>A transistor.</mattext>            
						</material>          
					</response_label>          
					<response_label ident = "B">            
						<material>              
							<mattext>A resistor</mattext>            
						</material>          
					</response_label>          
					<response_label ident = "C">            
						<material>              
							<mattext>A capacitor</mattext>            
						</material>          
					</response_label>          
					<response_label ident = "D">            
						<material>              
							<mattext>An inductor</mattext>            
						</material>          
					</response_label>        
				</render_choice>      
			</response_lid>    
		</presentation>    
		<resprocessing>      
			<outcomes>        
				<decvar/>      
			</outcomes>      
			<respcondition title = "Transistor" continue = "Yes">        
				<conditionvar>          
					<varequal respident = "MC_01">A</varequal>        
				</conditionvar>        
				<setvar action = "Set">0</setvar>        
				<displayfeedback feedbacktype = "Response" linkrefid = "Transistor"/>      
			</respcondition>      
			<respcondition title = "Resistor" continue = "Yes">        
				<conditionvar>          
					<varequal respident = "MC_01">B</varequal>        
				</conditionvar>        
				<setvar action = "Set">0</setvar>        
				<displayfeedback feedbacktype = "Response" linkrefid = "Resistor"/>      
			</respcondition>      
			<respcondition title = "Capacitor" continue = "Yes">        
				<conditionvar>          
					<varequal respident = "MC_01">C</varequal>        
				</conditionvar>        
				<setvar action = "Set">1</setvar>        
				<displayfeedback feedbacktype = "Response" linkrefid = "Capacitor"/>      
			</respcondition>      
			<respcondition title = "Inductor" continue = "Yes">        
				<conditionvar>          
					<varequal respident = "MC_01">D</varequal>        
				</conditionvar>        
				<setvar action = "Set">0</setvar>        
				<displayfeedback feedbacktype = "Response" linkrefid = "Inductor"/>      
			</respcondition>    
		</resprocessing>    
		<itemfeedback ident = "Transistor" view = "Candidate">      
			<material>        
				<mattext>Transistors are used to amplify or switch both AC and DC currents, the correct answer is capacitor.</mattext>      
			</material>    
		</itemfeedback>    
		<itemfeedback ident = "Resistor" view = "Candidate">      
			<material>        
				<mattext>Resistors impede the flow of both AC and DC currents, the correct answer is capacitor.</mattext>      
			</material>    
		</itemfeedback>    
		<itemfeedback ident = "Capacitor" view = "Candidate">      
			<material>        
				<mattext>Yes, capacitors prevent DC current flowing.</mattext>      
			</material>    
		</itemfeedback>    
		<itemfeedback ident = "Inductor" view = "Candidate">      
			<material>        
				<mattext>Inductors have high impedance for AC currents and low impedance for DC currents, the correct answer is capacitor.</mattext>      
			</material>    
		</itemfeedback>  
	</item>
</questestinterop>
Return current item: Ps and Qs: Processing QTI using PHP