Wiki source code of Schnittstelle ONYX Player

Last modified by Carina Enke on 17.09.2026

Show last authors
1 {{section}}
2 {{column width="60%"}}
3 The API between the ONYX Player and the LMS consists of the following components:
4
5 * Registration of a test with the ONYX Player through the LMS
6 * Registration of a participant with the ONYX Player through the LMS
7 * Test control
8 * Return of test results to the LMS through the ONYX Player
9 * Deregistration of the test
10 {{/column}}
11
12 {{column width="30%"}}
13 {{panel title="Content"}}
14 {{toc depth="2" start="2"/}}
15 {{/panel}}
16 {{/column}}
17 {{/section}}
18
19 == General information ==
20
21 The ONYX Player defines a web service, which is accessible via the URL **<ONYXPlayer-URL>/onyx/onyxexamservices**.
22
23 Link to the WSDL of the public demo runtime: [[http:~~/~~/demo.bps-system.de/onyx/onyxexamservices?wsdl>>url:http://demo.bps-system.de/onyx/||shape="rect"]]
24
25 == Registration of a test ==
26
27 Before participants can take tests, the tests need to be registered with ONYX.
28
29 {{code language="xml" title="Registration"}}
30 @WebMethod(operationName = „registerTest")
31 public Long registerTest(
32 @WebParam(name = „testSessionId") final Long testSessionId,
33 @WebParam(name = „providerId") final String providerId,
34 @WebParam(name = „contentPackage") final byte[] contentPackage,
35 @WebParam(name = „parameters") final MapWrapper parameters) throws Exception {
36 }
37 {{/code}}
38
39 === Parameters registerTest ===
40
41 |(((
42 testSessionId
43 )))|(((
44 Unique ID assigned by the LMS, which serves as an identifier for this test.
45 )))
46 |(((
47 providerId
48 )))|(((
49 Identification under which the requesting LMS is registrated with ONYX.
50 )))
51 |(((
52 contentPackage
53 )))|(((
54 The IMS QTI v2.1 CP (zip file as byte array).
55 )))
56 |(((
57 parameters
58 )))|(((
59 (% class="content-wrapper" %)
60 (((
61 (% class="TableParagraph" %)
62 List of parameters to control the test. It is also possible to set additional parameters for the individual participant (registerStudent). 
63
64 (% class="TableParagraph" %)
65 All parameters are optional. The default setting is shown in bold. 
66
67 (% class="wrapped" %)
68 |=(((
69 Paramter
70 )))|=(((
71 Description
72 )))
73 |(((
74 showSolution [true|**false**]
75 )))|(((
76 Should the correct answer be displayed to the user?
77 )))
78 |(((
79 isSynchronized [true|**false**]
80 )))|(((
81 Is the test for which the test start is synchronised across all users in the exam mode?
82 )))
83 |(((
84 continuationAllowed [true|**false**]
85 )))|(((
86 Is it allowed to continue the test session at any time? If not, each test start must be performed via the LMS.
87 )))
88 |(% colspan="1" %)(% colspan="1" %)
89 (((
90 suspendAllowed [true|**false**]
91 )))|(% colspan="1" %)(% colspan="1" %)
92 (((
93 Is it is allowed to interrupt the test? If this is the case, the button "Suspend" will additionally be displayed.
94 )))
95 |(% colspan="1" %)(% colspan="1" %)
96 (((
97 Templateid:
98 )))|(% colspan="1" %)(% colspan="1" %)
99 (((
100 Currently only supported: onyxwithoutnav - hides the navigation tree.
101 )))
102 |(% colspan="1" %)(% colspan="1" %)
103 (((
104 dontShowItemTitles [true|**false**]
105 )))|(% colspan="1" %)(% colspan="1" %)
106 (((
107 Should the titles of the questions not be displayed?
108 )))
109
110 {{note}}
111 Since ONYX version 5.15, the following parameters can be used to control the feedback and evaluation display for the participant while taking the test. A detailed description of the functionality from the user's perspective is provided in the section "Test procedure configuration".
112 {{/note}}
113
114 Questions evaluation:
115
116 (% class="wrapped" %)
117 |=(((
118 Parameter
119 )))|=(((
120 Description
121 )))
122 |(((
123 itemShowFeedback [**true**|false]
124 )))|(((
125 The question feedback defined by the author is displayed to the participant after submitting an answer to the question.
126 )))
127 |(((
128 itemShowMaxScore [**true**|false]
129 )))|(((
130 The participant is shown the maximum possible score for each question.
131 )))
132 |(% colspan="1" %)(% colspan="1" %)
133 (((
134 itemShowScore [**true**|false]
135 )))|(% colspan="1" %)(% colspan="1" %)
136 (((
137 The participant is shown the number of points achieved for the question after submitting their answer.
138 )))
139 |(% colspan="1" %)(% colspan="1" %)
140 (((
141 itemShowCorrect [**true**|false]
142 )))|(% colspan="1" %)(% colspan="1" %)
143 (((
144 The participant is shown whether their answer was correct or incorrect after submitting their answer. Implies itemShowScore=true.
145 )))
146 |(% colspan="1" %)(% colspan="1" %)
147 (((
148 itemShowSolution [**true**|false]
149 )))|(% colspan="1" %)(% colspan="1" %)
150 (((
151 The participant is shown the correct solution after submitting their answer. Implies itemShowCorrect=true and itemShowScore=true.
152 )))
153
154 Test evaluation:
155
156 (% class="wrapped" %)
157 |=(((
158 Parameter
159 )))|=(((
160 Description
161 )))
162 |(((
163 testShowFeedback [**true**|false]
164 )))|(((
165 After submitting the test, the participant is shown a test completion page, which does (not) contain the test feedback defined by the author.
166 )))
167 |(((
168 testShowScore [**true**|false]
169 )))|(((
170 After submitting the test, the participant is shown a test completion page, which does (not) contain all determined point values, such as the total test score and the points per test section, if applicable.
171 )))
172 |(((
173 testShowPassed [**true**|false]
174 )))|(((
175 After submitting the test, the participant is shown a test completion page, which does (not) contain information about whether or not the test was passed. The default is the value given in testShowScore or its default.
176 )))
177
178 {{info title="Note"}}
179 If no evaluation information is displayed on question level (itemShowFeedback = false, itemShowScore = false, itemShowCorrect = false, itemShowSolution = false), then the participant will not be shown the button to submit questions while taking the test. Instead, the answers are saved at any time and assessed after test submission.
180 {{/info}}
181
182 {{error}}
183 The following parameters are (% style="color: rgb(255,0,0);" %)__no longer__ (%%)available since **ONYX** **version 5.15**:
184 {{/error}}
185
186 * showSolution [**true **|false] - Replaced by testShowScore, testShowPassed, itemShowSolution (including implications)
187 * showFeedback [**true **|false] - Replaced by testShowFeedback and itemShowFeedback
188 )))
189 )))
190
191 === ReturnValue registerTest ===
192
193 (% class="wrapped" %)
194 |(((
195 Long
196 )))|(((
197 **One of the following values:**
198
199 * WAITING(0) – waiting for test start
200 * WORKING(1) – is processing the test
201 * FINISHED(2) – submitted the test
202 * RESUME_ALLOWED(3) – resuming allowed
203 * NOT_ENTERED(4) – has not yet entered the test
204 * CANCELED(5) – has cancelled the testing process
205 * RESUME_REQUESTED(6) – wishes to continue
206 * RESUMED(7) – has continued
207 * DISCONNECTED(8) – client is not / no longer reachable
208 * SUSPENDED(9) – testing process has been interrupted
209 * RESUME_SUSPENDED(10) – interrupted testing process is continued
210 * OK(42) – OK
211 )))
212 |(((
213
214 )))|(((
215 **Error codes:**
216
217 * ERROR_RETURN_RESULTS(0xFF01)
218 * ERROR_MULTIPLE_REGISTER_STUDENT_WITH_SAME_ID_CALLS(0xFF02)
219 * ERROR_REGISTER_STUDENT_WITH_UNKNOWN_TEST_ID(0xFF03)
220 * ERROR_REGISTER_STUDENT_WITH_EMPTY_TEST_ID(0xFF04)
221 * ERROR_REGISTER_STUDENT_WITH_EMPTY_STUDENT_ID(0xFF05)
222 * ERROR_REGISTER_STUDENT_TO_RESUME_WITHOUT_PAYLOAD(0xFF06)
223 * ERROR_REGISTER_STUDENT_FOR_UNKNOWN_PROVIDER(0xFF07)
224 * UNKNOWN(-1)
225 )))
226
227
228
229
230 == Registration of a student ==
231
232 Students can use a test after it has been registered, provided that they have been registered as well.
233
234 {{code title="Registration"}}
235 @WebMethod(operationName = „registerStudent")
236 public Long registerStudent(
237 @WebParam(name = „testSessionId", partName = „testSessionId") final Long test
238 SessionId,
239 @WebParam(name = „studentId", partName = „studentId") final Long studentId,
240 @WebParam(name = „payload", partName = „payload") final byte[] payload,
241 @WebParam(name = „parameters") final MapWrapper parameters) throws Exception {
242 }
243 {{/code}}
244
245 === Parameters registerStudent ===
246
247 (% class="wrapped" %)
248 |(((
249 testSessionId
250 )))|(((
251 (% class="TableParagraph" %)
252 Unique ID assigned by the LMS, which serves as an identifier for the test (cf. registerTest).
253 )))
254 |(((
255 studentId
256 )))|(((
257 (% class="TableParagraph" %)
258 Unique identification for test participants. ID will be returned by ONYX when status changes or results are transmitted.
259 )))
260 |(% colspan="1" %)(% colspan="1" %)
261 (((
262 payload
263 )))|(% colspan="1" %)(% colspan="1" %)
264 (((
265 (% class="TableParagraph" %)
266 Optional. Results for the participant (e. g. if interrupted tests are continued).
267 )))
268 |(% colspan="1" %)(% colspan="1" %)
269 (((
270 parameters
271 )))|(% colspan="1" %)(% colspan="1" %)
272 (((
273 (% class="TableParagraph" %)
274 List of test control parameters (all optional, bold = default):
275
276 * Language [**de**|en|fr|es]: Language of the ONYX user interface.
277 * Status: Initial status of the participant (currently only RESUME_SUSPENDED(10) is supported).
278 )))
279
280 === ReturnValue registerStudent ===
281
282 (% class="wrapped" %)
283 |(((
284 Long
285 )))|(((
286 One of the values as described under "Registration of a test".
287 )))
288
289 == Test control ==
290
291 The status of registered test participants can be controlled by the LMS, e. g. to start, finish, or continue the test for everyone after the tutor has approved of it.
292
293 {{code title="Test control"}}
294 @WebMethod(operationName = „testControl")
295 public Long testControl(
296 @WebParam(name = „testSessionId") final Long testSessionId,
297 @WebParam(name = „studentIds") final StudentIdsWrapper students,
298 @WebParam(name = „status") final Integer status,
299 @WebParam(name = „parameters") final MapWrapper parameters) throws Exception {
300 }
301 {{/code}}
302
303 === Parameters testControl ===
304
305 (% class="wrapped" %)
306 |(((
307 testSessionId
308 )))|(((
309 Unique ID assigned by the LMS, which serves as an identifier for the test (cf. registerTest).
310 )))
311 |(((
312 studentIds
313 )))|(((
314 List of unique IDs for test participants.
315 )))
316 |(((
317 status
318 )))|(((
319 New status to be set for the given test participants.
320 )))
321 |(((
322 parameters
323 )))|(((
324 List of test control parameters (all optional):
325
326 * addTime: Time in minutes to add to the test session.
327 )))
328
329 === ReturnValue testControl ===
330
331 (% class="wrapped" %)
332 |(((
333 Long
334 )))|(((
335 One of the values as described under "Registration of a test".
336 )))
337
338
339
340
341 == Clear storage ==
342
343 When all participants have finished the test, the LMS can inform ONYX to deregister the test and to clear the storage.
344
345 {{code title="Test control"}}
346 @WebMethod(operationName = „deregisterTest")
347 public Long deregisterTest(
348 @WebParam(name = „testSessionId") final Long testSessionId,
349 @WebParam(name = „providerId") final String providerId,
350 @WebParam(name = „parameters") final MapWrapper parameters) throws Exception {
351 }
352 {{/code}}
353
354 === Parameters deregisterTest ===
355
356 (% class="wrapped" %)
357 |(((
358 testSessionId
359 )))|(((
360 Unique ID assigned by the LMS, which serves as an identifier for the test (cf. registerTest).
361 )))
362 |(((
363 providerId
364 )))|(((
365 Identification under which the requesting LMS is registered with ONYX.
366 )))
367 |(((
368 parameters
369 )))|(((
370 Currently not used.
371 )))
372
373 === ReturnValue deregisterTest ===
374
375 (% class="wrapped" %)
376 |(((
377 Long
378 )))|(((
379 One of the values as described under "Registration of a test".
380 )))
381
382 == Test display ==
383
384 After a test has been registered with the Player, the user can display it **exactly once**. For this reason, the LMS will show an IFrame with the target URL <ONYXWebPlayer-URL>/onyx/onyxrun?id=<UID> in the browser window. The <UID> must be the unique studentId used in the test registration. The test will then be started. If the user finishes the test, the results will be returned to the LMS. The LMS then needs to define a web service API that exactly matches the WSDL available under the following URL:
385
386 {{note title="URL"}}
387 [[http:~~/~~/demo.bps-system.de/olatce/services/ReturnWSService?wsdl>>url:http://demo.bps-system.de/olatce/services/ReturnWSService?wsdl||shape="rect"]]
388 Only the URL in the lower part of the WSDL has to be adapted to the LMS.
389 {{/note}}
390
391
392 == Configuration of the ONYX Player ==
393
394 The ONYX Player uses a configuration file named onyxplugin.config.xml, which must be stored in the Java Classpath.
395
396 {{error title="Security"}}
397 Both the WSDL of the ONYX Player and the LMS should not be accessible/visible "from the outside". This also applies to the respective web services. The web GUI of the LMS and the ONYX Player, in contrast, must be visible to and accessible by all users. If HTTPS is used during the test process (which is strongly recommended), then the appropriate certificate must be known to the corresponding JVM of the LMS and the ONYX Player. Otherwise web service communication will not be possible.
398 {{/error}}
399
400
401 If you have any questions about the configuration or the use of the ONYX Testsuite in other platforms, we will be happy to help you.
402
403 {{panel title="BPS Bildungsportal Sachsen GmbH"}}
404 **[[image:attach:BPS-Logo-web.png]]**
405
406 **Phone: **+49 (0) 371 666 2739 0
407 [[support@bps-system.de>>mailto:support@bps-system.de||shape="rect"]]
408
409 You are also welcome to use our (% style="text-align:left" %)**[[Contact form>>url:https://www.bps-system.de/cms/kontakt/||shape="rect"]]**(%%).
410 {{/panel}}