06 Interface ONYX Editor

Last modified by Carina Enke on 13.02.2024

Save results

With the ONYX Editor, system independent tests may be published. If users perform these tests, the result will be transferred back to the ONYX Editor, which saves it. The ONYX Editor provides the following REST interfaces:

Save results
@RestMethod(name = "saveResult2")
public Boolean saveResult(
@RestParam(name = "uniqueId") final String uniqueId,
@RestParam(name = "resultFile") final byte[] resultFile,
@RestParam(name = "params") final Map<String, String> params) {}

Parameter saveResult2

uniqueId

Unique ID used by the ONYX WebPlayer and ONYX Editor when running the test.

resultFile

Result file as ZIP file (QTI-compliant result.xml, including any referenced files such as user uploads or user content if necessary)

params

Generic parameters. These are currently only stored without further processing.

returnValue saveResult2

boolean

True if successful, otherwise false

Save results (legacy)

Save results (legacy)
@RestMethod(name = "saveResult")
public Boolean saveResult(
@RestParam(name = "uniqueId") final String uniqueId,
@RestParam(name = "resultFile") final byte[] resultFile) {}

Parameter saveResult2

uniqueId

Unique ID used by the ONYX WebPlayer and ONYX Editor when running the test.

resultFile

Result file as ZIP file (QTI-compliant result.xml, including any referenced files such as user uploads or user content if necessary)

returnValue saveResult2

boolean

True if successful, otherwise false

Query interface version

Query version
@RestMethod(name = "version")
public String version() {}

Parameter version

None

returnValue saveResult2

String

REST interface version, currently always "1.0 (ONYX Editor version)"

Delete user

The ONYX Editor can be coupled to an LMS with the LMS being the user data management system. If users are deleted from the LMS, all related data (e. g. personal user settings) should also be deleted from the ONYX Editor.

Delete user
@RestMethod
public Map<String, String> deleteUser(
        
@RestParam(name = "login") final String login,
        
@RestParam(name = "password") final String password,
        
@RestParam(name = "repo") final String repo,
        
@RestParam(name = "property") final String property,
        
@RestParam(name = "values") final ArrayList<String> values,
        
@RestParam(name = "reason") final String reason,
        
@RestParam(name = "params") final Map<String, String> params) {}

Parameter deleteUser

login

User name of an ONYX Editor admin user who has the right to delete other users.

password

Password of this ONYX Editor admin user.

repo

ID of the LMS repository as it is already configured in the LMS and used for communication with the ONYX Editor.

property

Selection criterion for the users to be deleted. If "uid", filtering is done according to the globally valid user identifier (Shibboleth criterion). Otherwise, the filtering is done according to the user names used internally by the LMS in conjunction with the ONYX Editor.

values

List of values to filter by, for example, list of user names.

reason

Reason for deletion. Will be included in the deletion log.

params

Currently not used

returnValue deleteUser

Deletion result information.

Key

The values as specified in the _values_ parameter

Value

Deletion result (e. g _NOT FOUND_, _ERROR:xyz_, ...)