You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm new to this project i just study the SDK code.
I'm looking for a way to unmarshal a single \DomElement to validate small pices of xml. But while trying I encounter some Exceptions.
This is what i try to accomplish:
$sdkMarshaller = newQti211MarshallerFactory();
$cradle = newDOMDocument('1.0', 'UTF-8');
$xml = new \DOMElement('hottextInteraction', '<p>Sponsors of the Olympic Games <hottext identifier="A">who bought</hottext> advertising time on United States television <hottext identifier="B">includes</hottext> <hottext identifier="C">at least</hottext> a dozen international firms <hottext identifier="D">whose</hottext> names are familiar to American consumers. <hottext identifier="E">No error.</hottext> </p>');
$cradle->appendChild($xml);
$xml->setAttribute('maxChoices', 1);
$xml->setAttribute('responseIdentifier', 'RESPONSE');
$hottextMarshaller = $sdkMarshaller->createMarshaller($cradle->firstChild);
$hottextMarshaller->unmarshall($cradle->firstChild);
I receive the exception : The value 'RESPONSE' for the attribute 'responseIdentifier' for element 'hottextInteraction' is not a valid QTI identifier.
But the original exception message is : A HottextInteraction object must be composed of at least one BlockStatic object, none given.
I think its starts here : \qtism\data\storage\xml\marshalling\responseIdentifier:47
The QtiComponentCollection is empty, and I can't find the correct way to provide a working instance of this to the marshaller
I hope someone can point me to the right direction
Kind regards,
Andreas
The text was updated successfully, but these errors were encountered:
Hi,
I'm new to this project i just study the SDK code.
I'm looking for a way to unmarshal a single \DomElement to validate small pices of xml. But while trying I encounter some Exceptions.
This is what i try to accomplish:
I receive the exception :
The value 'RESPONSE' for the attribute 'responseIdentifier' for element 'hottextInteraction' is not a valid QTI identifier.
But the original exception message is :
A HottextInteraction object must be composed of at least one BlockStatic object, none given.
I think its starts here : \qtism\data\storage\xml\marshalling\responseIdentifier:47
The QtiComponentCollection is empty, and I can't find the correct way to provide a working instance of this to the marshaller
I hope someone can point me to the right direction
Kind regards,
Andreas
The text was updated successfully, but these errors were encountered: