Feature Wiki
Tabs
Offline-Support for Test Questions
Page Overview
[Hide]1 Initial Problem
Although the Introducing Assessment Question Service has been rejected by JourFixe-2021-07-12, one of its original goals is stil relevant: questions should be used in different components of ILIAS. This is currently only supported by ILIAS Learning modules, but with a different implementation. The different implementation is neccessary because learning modules can be exported as HTML and questions on their pages need to work offline in the export.
In the upcoming ILIAS releases, a revision of the presentation of test questions is being worked on, which should lead to an implementation using kitchen sink elements. This feature request aims to ensure that the offline capability of questions is fully taken into account during the specification and implementation of the new kitchen sink elements. Otherwise a parallel implementation would be neccessary again during the implementation for learning modules.
2 Conceptual Summary
The following diagrams show the current online behabior of ILIAS and two concepts for offline players. This feature request is intended to support the second one.
![](./data/docu/mobs/mm_73007/current.png?il_wac_token=2faab6eb1bb2e7695be9175c9e3df5024a620ac8&il_wac_ttl=5&il_wac_ts=1725755491)
ILIAS deliveres a fully rendered page including the test question. An existing user solution is already set in this page (e.g. choice 1). Submitting the answer sends the choice as POST to the ILIAS server and ILIAS delivers a the page of the next question. This cannot work offline.
![](./data/docu/mobs/mm_73008/generic.png?il_wac_token=2faab6eb1bb2e7695be9175c9e3df5024a620ac8&il_wac_ttl=5&il_wac_ts=1725755491)
The University of Marburg implemented a generic prototype of an offline test player that keeps the current request and response workflow of test questions as far as possible. The offline player is implemented as a service worker and works as a proxy for requested pages and posts of solutions. When a solution is submitted, the post data is additionally stored in an offline store of the browser. Additionally the whole DOM of the displayed page is stored in an offline cache of the browser. The stored page represents the current answering state of the user. When a question is shown, the whole page of that question is taken from the cache, representing tha last answering state.
This workes astonishingly good but has some drawbacks:
- It deals only with whole pages. Multiple questions on a page (e.g. in learning modules) are not supported.
- It depends on the behavior of the standard test player regarding request cycles and query or post data.
- The page cache has to be initially filled with the question pages. These are currently provided with some dirty tricks.
![](./data/docu/mobs/mm_73009/question.png?il_wac_token=2faab6eb1bb2e7695be9175c9e3df5024a620ac8&il_wac_ttl=5&il_wac_ts=1725755491)
The envisaged concept builds on the mechanism of the Marburg solution but takes advantage of the offline capability of test questions proposed here. The player can be part of the displayed ILIAS page. It can take a a scaffolding DOM of the unaswered question from the cache and include it on its page. Alternatively the question DOM can already be delivered with that page. The player takes the answer of the user from an offline store and let the question show it. It reacts on user input in the question, reads the user solution and can store it or send it to ILIAS.
Main advantages of that solution:
- Multiple questions on the same page (e.g. in learning modules) are possible. Each question can act independently.
- The player has no dependencies with the request cycle or specific implementation of the page.
- A wide range of players are supported: from simple embedded players on pages to full-range offline exam players.
To support offline players, some of the existing functions of test questions must be moved from PHP to JavaScript. Specifically, the following steps must be completely feasible in JavaScript without a page request cycle:
- Display of an unanswered question
- Recognition of a response and readout of the user solution
- Displaying the question again with a saved user solution
- Eventually evaluation of the user solution and generation of the achieved points and feedback (for offline learning modules)
- Display of a generated feedback in the question
In the feature request Test Question Interface an approach was developed which was based on the possibilities of ILIAS 5.3. This approach has to be redesigned with the current possibilities of the UI framework.
The UI component of a question in PHP provides the basic structure of the question canvas, which may already look like an unanswered question, but may also contain hidden feedback containers. In addition, the question must be able to provide a set of assets (especially media) that are required for display, as well as a set of Javascript modules needed for the question handling.
Essential functions regarding the display and answering of a question must be done via Javascript:
- The context (test player or learning module) adds the basic question DOM as a question canvas to the page and initializes the JS modules of the question.
- The context pushes an existing user solution as a data object to the display module of the question. This changes the display in the canvas accordingly (e.g. sets checkboxes or fills gaps).
- The display module of the question signals to the context that an answer has been given.
- The context fetches the current user solution from the display module of the questionas a data object and stores it.
- The JS delivered with a question includes an evaluation module. It is initialized with a data object that defines how user solutions should be rated and how the feedback is generated. That data object may be obfuscuated somehow.
- The context (learning module) calls the evaluation module of the question with the data object of a user solution and gets a data object from the evaluation module that includes a structured feedback and (eventually) the reached points.
- The context calls the display module of the question with the feedback object.
- The display module show the feedback and the reached points in the question canvas at appropriate places.
3 User Interface Modifications
No specific user interface modifications are foreseen in extension to the KitchenSink refactoring of the test questions. The offline capability should completely work in the background. If the refactored questions are used in a learning module, then these questions will exactly look like in a test.
3.1 List of Affected Views
All views where test questions are displayed for being answered, initially question preview and test player.
3.2 User Interface Details
{For each of these views please list all user interface elements that should be modified, added or removed. Please provide the textual appearance of the UI elements and their interactive behaviour.}
3.3 New User Interface Concepts
{If the proposal introduces any completely new user interface elements, you might consult UI Kitchen Sink in order to find the necessary information to propose new UI-Concepts. Note that any maintainer might gladly assist you with this.}
4 Technical Information
{The maintainer has to provide necessary technical information, e.g. dependencies on other ILIAS components, necessary modifications in general services/architecture, potential security or performance issues.}
5 Contact
- Author of the Request: Neumann, Fred [fneumann]
- Maintainer: Studer, Martin [mstuder]
- Implementation of the feature is done by: {The maintainer must add the name of the implementing developer.}
6 Funding
If you are interest in funding this feature, please add your name and institution to this list.
- …
7 Discussion
Neumann, Fred [fneumann], March 19, 2019:
Results from the initial feature workshop today:
- Javascript handling in ILIAS is a topic for many components and a general concept (library / framework use, templating, interfaces etc.) needs to be discussed.
- A group of developers should work on that (e.g. in a SIG) in parallel to the kitchen sink implementation of test questions.
- Continuous exchange between this this group an the working group for KS definition of test questions is needed
- Possible starting point can be a 'future workshop', earliest in Mai due to heavy work on the page layout revision
- Ideally the KS elements for all test questions can be implemented (but not used) until November (estimation by atoedt)
- Refactoring of questions in test and learning modules using these elements can then be done from November on for ILIAS 6.1
8 Implementation
{The maintainer has to give a description of the final implementation and add screenshots if possible.}
Test Cases
Test cases completed at {date} by {user}
- {Test case number linked to Testrail} : {test case title}
Approval
Approved at {date} by {user}.
Last edited: 6. Feb 2023, 18:58, Neumann, Fred [fneumann]