User:Miriya52/week2

Refer to project glossary for acronyms and definitions.
Week 2: December 12 - 16

Objectives

edit
  • Load GIFT format data into pyslet data structures, with some basic unit tests
  • Eventually, write out GIFT format as WikiQuiz format

Progress Update

edit

To add GIFT support in pyslet, I plan to add a GIFT directory in pyslet under https://github.com/anna-liao/pyslet/tree/master/pyslet. The plan is to use a similar structure to the qtiv2 directory, which implements QTI v2.1.

The first step is to map the GIFT features to the QTI v2.1 features. As I go through pyslet.readthedocs.io and the pyslet source code, I notice that the QTI specifications covers many UI/UX features, such as how the user interaction influences the next question displayed, that are not specified in the GIFT format. GIFT specifies the syntax to specify a question and text formatting.

Notes on pyslet.qtiv2 classes

edit

Here are my notes on pyslet.qtiv2 classes and how GIFT may be mapped to each class.

  • items: info presented to candidate and info about how to score [Is question prompt here?]
  • tests: rules to specify which items the candidate sees, what order, how how the candidate interacts with them [Not a feature in GIFT]
  • NavigationMode: determines general paths that candidate may take. Restricts how candidate attempts each item in turn. Once candidate moves on, not permitted to return. Also nonlinear mode, which allows the candidate to freely navigate to any item. [Not a feature in GIFT]
  • SubmissionMode: determines when candidate's responses are submitted for response processing, either item-by-item or all at once. [Not a feature in GIFT]

Content:

  • ItemBody: text, graphics, media objects, and interactions that describe item's content and info about how it is structured. [Somehow ties into the GIFT media plugin]
  • BodyElement: root class of all content objects
  • TextElements: text formatting, such as 'code', 'h1', 'h2', 'div', 'span'. [GIFT text formatting is moodle, html, plain, and markdown]
  • ListElements: 'li', 'ul'
  • ObjectElements: = {'object': ('id', 'class', 'label', 'data', 'type', 'width', 'height'), 'param': ('id', 'class', 'label', 'name', 'value', 'valuetype', 'type')}
  • PresentationElements: basically tables. 'table', 'colgroup'
  • ImageElement: = {'img': ('id', 'class', 'label', 'src', 'alt', 'longdesc', 'height', 'width')}
  • HypertextElement = 'a': ('id', 'class', 'label', 'href', 'type')}
  • HTMLProfile: full HTML profile defined by QTI

Interactions (base: pyslet.qtiv2.content.BodyElement)

  • Choice
  • AssociableChoice (base: pyslet.qtiv2.interactions.Choice). [GIFT matching]
  • ChoiceInteraction (base: pyslet.qtiv2.interactions.BlockInteraction). Presents set of choices to candidate. Candidate's task is to select one or more choices, up to maximum of maxChoices. [GIFT multiple choice, multiple answers]
  • OrderInteraction. Reorder choices, order in which choices are displayed initially is significant. [Not a feature in GIFT]
  • MatchInteraction (base: pyslet.qtiv2.interactions.BlockInteraction) presents candidates with two sets of choices and allows them to create associations between pairs of choices in the two sets, but not between pairs of choices in the same set. [GIFT matching]
  • GapChoice: simple run of text to be inserted into gap by user. [GIFT missing word]
  • Text-based interactions
  • InlineChoiceInteraction [GIFT missing word]
  • TextEntryInteraction [GIFT short answer]
  • TextFormat: used to control the format of the text entered by candidate, such as plain, preformatted, xhtml.
  • ExtendedTextInteraction [GIFT essay]
  • Graphical Interactions [not a feature in GIFT]

qtiv2.processing same as GIFT feedback?

Questions for discussion

edit
  • pyslet.qtiv2 has many layers of inheritance. The base classes have xml tags that would be irrelevant for the GIFT format. Should I implement the same structure with multiple layers of inheritance, or just a simple class that doesn't inherit but still mimics the similar class in QTI v2.1?

Here is the pyslet.qtiv2 class for multiple choice. I would try to write a similar class for the GIFT format. Notice how it inherits BlockInteraction, which in turns, inherits Interaction, which calls on content.BodyElement, which calls on core.QTIElement. From what I can tell, the inheritance adds more xml tags. QTIElement is the basic element to represent all QTI elements, and it inherits xml namespace element.

  • Should I ask Steve Lay for more guidance on how to structure the GIFT class?

Plan for next week

edit

Write unit tests. For GIFT: parse question prompt, check object properties assigned correctly, check interaction and responses change state and display correctly. GIFT unit tests will NOT simulate UI/UX interactions.

Here is an example of a qtiv2 unit test to check for a correct response. I am thinking to write a basic unit test like this, and then write the classes and functions for it.

Write functions to parse question test and checks value types.

Here is the qtiv2 parser class, which calls on the general pyslet xml parser.

Example of perl parser for GIFT.