Child pages
  • Integrating Word-2-QTI into Samigo
Skip to end of metadata
Go to start of metadata


There are six components to this code:

  • a Spring-injected service class
  • a JSF backing bean
  • three JSF ActionListener classes
  • three Domain classes
  • a Resource Bundle
  • a JUnit Test class

The service class obeys the following interface:

public interface SamLiteService {

	public QuestionGroup parse(String name, String description, String data);
        public Document createDocument(QuestionGroup questionGroup);
  • This interface declaration lives under samigo-api/src/java.
  • Package org.sakaiproject.tool.assessment.samlite.api
  • The implementing class currently lives under samlite-impl/src/java.
  • It's declared in components.xml
  • Package org.sakaiproject.tool.assessment.samlite.impl

The JSF backing bean

  • SamLiteBean wraps the two methods of the service interface, which is injected into this bean
  • It lives under samigo-app/src/java
  • Source directory samigo-app/src/java
  • Package org.sakaiproject.tool.assessment.ui.bean.samlite

The action listener classes are

  • AssessmentListener: to turn the QuestionGroup into an xml document and import it into Samigo
  • NameListener: to verify that a name has been entered for the assessment/question pool
  • ParserListener: to parse the text into a QuestionGroup
  • QuestionPoolListener: to turn the QuestionGroup into an xml document and import it into Samigo as a question pool
  • Source directory samigo-app/src/java
  • Package org.sakaiproject.tool.assessment.ui.listener.samlite

The domain classes are fairly basic and intuitive, they are:

  • Answer
  • Question
  • QuestionGroup
  • Package org.sakaiproject.tool.assessment.samlite.api
  • They currently live under samigo-api/src/java

There is also a resource bundle

  • (located in the same directory with the other resource bundles).

And a JUnit Test class

  • /tests/src/java/
  • plus its accompanying text file "TestQuiz.txt".

User Interface

Here are screenshots of the changes and additions to the UI. These are a work-in-progress. They probably don't conform to the Sakai standards at all, yet.

Preliminarily, we've added a new button to the Samigo Authoring front door page called 'Quick Create'. So the user will simply type in an assessment/question pool name like normal, then click on 'Quick Create' instead of 'Create', and it will take them to the data entry page. Selecting an assessment template will also work, though we haven't yet tested to make sure that the QTI settings don't override some of the template settings – they probably do at the moment.

Changed Author FrontPage Screen:

Data Entry Screen:

Data Validation Screen:

Apologies – Confluence doesn't let you order the gallery macro images.

Underlying technologies

We're using the Apache commons xmlbeans library to convert QTI schemas into Java classes, and building these into a jar we currently call imsqti-1.2.jar (where the 1.2 refers to the version of the QTI spec) – this jar will have to be made available somewhere so everybody can build the modified Samigo.

Technical changes to the Samigo project

We've added a bunch of new packages to the Samigo project, including a new source directory/project.xml file called samlite-impl/src/java which includes the simple service implementation that does the parsing and conversion into qti. The interface for this service is in a new package under samigo-api/src/java called 'org.sakaiproject.tool.assessment.samlite.api'.

The logic behind creating a new source directory was so the xmlbeans and imsqti jars wouldn't have to be stuck in shared/lib – instead, samlite-impl is deployed into components/samigo-pack/WEB-INF/lib along with the necessary jars. Obviously, this can easily be refactored if folks don't like it.

The pages shown above are implemented in JSF, using the listener pattern that Samigo uses throughout, with a single backing bean called SamLiteBean, which has the service injected through Spring/JSF in the normal fashion.

Major outstanding issues:

  • Need to create help pages for all the different question types, with examples
  • Need to enhance tests to do integration testing, more extensive unit testing
  • Need to be able to turn off this functionality using DONE!
  • No labels