OTTextPane uses an OTXMLString for its text attribute. For an otml
example check out:
http://continuum.concord.org/otrunk/examples/Biologica/biologica-static-organism-screen.otml.
OTTextPaneView calls getText().toString() on the otobject which results
in a String of all that XML. That can then be passed in to whatever, in
this case a JTextPane. (You'll notice that the OTTextPaneView first
calls local method fixString() on it, but that's only because the
JTextPane doesn't support XHTML and things like <br/> break it.
For what you're doing, you can ignore that.)
-- Aaron
Anthony Perritano wrote:
thanks scott.
have been checking out some otml files and the concord wiki OTrunk -
Public: Concord Software Projects - Confluencefor proper usage of
OTXMLString. Can someone send me an otml file or a wiki link for an
example?
thanks
On Mar 6, 2008, at 11:39 AM, Scott Cytacki wrote:
Ingrid is resting and I can't sleep, so I have a minute to reply.
You want to make a property on the OTNote (or what ever it is called),
with a type of OTXMLString.
Then to add the qti xml, you should make a String out of it, and create
a new OTXMLString with that String. Then
call the set method for the property with that OTXMLString object.
You will need to strip off the
"<?xml version="1.0" encoding="UTF-8" standalone="yes"?>"
from the string otherwise things will get screwed up.
That is basically it. When you then save the otml you should see the
qti embedded inline inside of the
otml file.
Scott
On Wed, 5 Mar 2008 23:34:51 -0800, "Anthony Perritano"
<[EMAIL PROTECTED]>
said:
I got the jaxb stuff to generate some nice
xml. I updated the QTI
bindings project with a test. Writes a
simple ExtendedTextInteraction
using the jaxb marshaller. Choice
interactions will follow. lets stick
with ExtendedTextInteractions for now,
check out this sweetiness:
<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
<assessmentItem xmlns="http://www.imsglobal.org/xsd/imsqti_v2p0"
xmlns:ns2="http://www.w3.org/1999/xlink"
xmlns:ns3="http://www.w3.org/1998/Math/MathML
" timeDependent="false" adaptive="false">
<responseDeclaration
identifier="TEXT_NOTE_ID"/>
<itemBody>
<extendedTextInteraction
placeholderText="I'm just sayin"
responseIdentifier="TEXT_NOTE_ID"
expectedLines="6">
<prompt><html><body>what?</body></
html></prompt>
</extendedTextInteraction>
</itemBody>
</assessmentItem>
now, next steps. or next question how do we
get this in a Assessment/
Note PO-Trunk Step.
1. i just copy and paste into the otml?
Scott, i remember you
mentioning some about which field to put it
in. Can you elaborate?
2. once it is in the otml, i need to
unmarshall it to an
AssessmentItemType and set in the
Assessment PasBean,
setAssessmentItem(AssessmentItemType). This
could happen in the
loadRealObject method.
3. Now when going from the authoring tool
and saving the bean. I would
marshall it to jaxb xml in the
saveRealObject to the appropriate
otrunk field.
would this be the appropriate places to do
this;loadRealObject,saveRealObject?
-Tony
--
Scott Cytacki
[EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "SAIL-Dev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/SAIL-Dev?hl=en -~----------~----~----~----~------~----~------~--~---
|