[QTI] choiceInteractions as rows of a table
Niall Barr
n.barr at admin.gla.ac.uk
Fri Jan 22 12:16:14 GMT 2010
Hi,
At the moment the specification requires choiceInteraction to contain
one or more simpleChoice elements, and nothing else other than an
optional prompt element, so mixing in XHTML (other than inside the
prompt and simpleChoice elements) isn't permitted. I think the best way
to get the control you want into the specification would be to improve
the guidelines for using stylesheets rather than making the mix of QTI
and XHTML elements more flexible (and complicated). For the system
developer the current specification is relatively simple, but making a
more complicated mix of XHTML and QTI would make things much more
difficult. Transparent elements might be simple in principle, but if the
XML libraries & tools developers are using don't understand the concept
the implementation could be very awkward.
QTIEngine seems to use a table to lay out choice items, so you could
include CSS that overrides the table, tr and td behaviour in your items
(using the stylesheet element which comes just before itemBody), and use
that to sort out the layout - I expect the same stylesheet would work
with several other systems as well, but that would depend on how they
render choice interactions.
A more satisfactory solution might be for a recommendation in the spec
(for systems that target generic browsers) to render choiceInteractions
in a consistent way, e.g. <div class="choiceInteraction"><div
class="prompt"></div><div class="simpleChoice"> etc. with the layout
controlled by CSS that can be overridden by the item style. You could
then add a stylesheet for horizontal layout to your items. The big
downside of that is that it would mean major updates to most current
implementations, so I'd be reluctant to support that for 2.1 final.
Niall
-----Original Message-----
From: ims-qti-bounces at lists.ucles.org.uk
[mailto:ims-qti-bounces at lists.ucles.org.uk] On Behalf Of Bart Nagel
Sent: 21 January 2010 16:01
To: IMS QTI mailinglist
Subject: [QTI] choiceInteractions as rows of a table
I want to present a set of true or false questions as rows of a table.
I've tried (leaving out attributes for brevity) <table>
<tbody>
<tr>
<choiceInteraction>
<td><prompt>question 1...</prompt></td>
<td><simpleChoice>true</simpleChoice</td>
<td><simpleChoice>false</simpleChoice</td>
</choiceInteraction>
</tr>
<tr>...</tr>
...
</tbody>
</table>
but it complains that the tr elements don't have enough td children
(needs at least one).
I've also tried
<table>
<tbody>
<choiceInteraction>
<tr>
<td><prompt>question 1...</prompt></td>
<td><simpleChoice>true</simpleChoice</td>
<td><simpleChoice>false</simpleChoice</td>
</tr>
</choiceInteraction>
<choiceInteraction>...</choiceInteraction>
...
</tbody>
</table>
and now it complains that the tbody element doesn't have enough tr
children (again, needs at least one). Wouldn't it make more sense if the
choiceInteraction element was "transparent" to layout elements?
Is there some other approach to this problem which will work?
--bart nagel
--
bart nagel
e: bjn at ecs.soton.ac.uk Skype: trem-b
w: ecs.soton.ac.uk/people/bjn Aim: bartremby
XMPP: tremby at jabber.org MSN: msn at tremby.net
More information about the IMS-QTI
mailing list