Wiki-Quellcode von Schnittstelle ONYX Editor

Version 44.1 von Carina Enke am 26.08.2019

Zeige letzte Bearbeiter
1 {{sv-translation language="de"}}
2 {{layout}}
3 {{layout-section ac:type="single"}}
4 {{layout-cell}}
5 \\
6 {{/layout-cell}}
7 {{/layout-section}}
8
9 {{layout-section ac:type="two_right_sidebar"}}
10 {{layout-cell}}
11 \\
12 {{/layout-cell}}
13
14 {{layout-cell}}
15 {{scroll-ignore}}
16 {{panel title="Inhalt"}}
17
18
19 {{toc/}}
20 {{/panel}}
21 {{/scroll-ignore}}
22 {{/layout-cell}}
23 {{/layout-section}}
24
25 {{layout-section ac:type="single"}}
26 {{layout-cell}}
27 == Ergebnisse speichern ==
28
29 Der ONYX Editor kann Tests für eine freie Durchführung publizieren. Führen Nutzer diese Tests durch, wird das Ergebnis zurück an den ONYX Editor übertragen, welcher es speichert. Dazu bietet der ONYX Editor folgende REST-Schnittstellen an:
30
31 {{code title="Ergebnisse speichern"}}
32 @RestMethod(name = "saveResult2")
33 public Boolean saveResult(
34 @RestParam(name = "uniqueId") final String uniqueId,
35 @RestParam(name = "resultFile") final byte[] resultFile,
36 @RestParam(name = "params") final Map<String, String> params) {}
37 {{/code}}
38
39 \\
40
41 === Parameter saveResult2 ===
42
43 (% class="wrapped" %)
44 |(((
45 uniqueId
46 )))|(((
47 Eindeutige ID, die ONYX WebPlayer und ONYX Editor bei der Ausführung des Tests vereinbart haben.
48 )))
49 |(((
50 resultFile
51 )))|(((
52 Ergebnis-Datei als ZIP-File (QTI-konformes result.xml, ggf. inkl. darin referenzierter Dateien wie User-Uploads oder User-Contents)
53 )))
54 |(((
55 params
56 )))|(((
57 Generische Parameter. Diese werden aktuell ohne weitere Verarbeitung einfach nur gespeichert.
58 )))
59
60 \\
61
62 === returnValue saveResult2 ===
63
64 (% class="wrapped" %)
65 |(((
66 boolean
67 )))|(((
68 True bei Erfolg, sonst false
69 )))
70
71 == Ergebnisse speichern (Legacy) ==
72
73 \\
74
75 {{code title="Ergebnisse speichern (Legacy)"}}
76 @RestMethod(name = "saveResult")
77 public Boolean saveResult(
78 @RestParam(name = "uniqueId") final String uniqueId,
79 @RestParam(name = "resultFile") final byte[] resultFile) {}
80 {{/code}}
81
82 \\
83
84 === Parameter saveResult2 ===
85
86 (% class="wrapped" %)
87 |(((
88 uniqueId
89 )))|(((
90 Eindeutige ID, die ONYX WebPlayer und ONYX Editor bei der Ausführung des Tests vereinbart haben.
91 )))
92 |(((
93 resultFile
94 )))|(((
95 Ergebnis-Datei als ZIP-File (QTI-konformes result.xml, ggf. inkl. darin referenzierter Dateien wie User-Uploads oder User-Contents)
96 )))
97
98 === returnValue saveResult2 ===
99
100 (% class="wrapped" %)
101 |(((
102 boolean
103 )))|(((
104 True bei Erfolg, sonst false
105 )))
106
107 \\
108
109 == Version der Schnittstelle abfragen ==
110
111 \\
112
113 {{code title="Version abfragen"}}
114 @RestMethod(name = "version")
115 public String version() {}
116 {{/code}}
117
118 \\
119
120 === Parameter version ===
121
122 keine
123
124 \\
125
126 === returnValue saveResult2 ===
127
128 (% class="wrapped" %)
129 |(((
130 String
131 )))|(((
132 Version der REST-Schnittstelle, aktuell immer "1.0 (ONYX-Editor-Version)"
133 )))
134
135 \\
136
137 == Nutzer löschen ==
138
139 Der ONYX Editor kann an ein LMS gekoppelt werden, so dass das LMS das nutzerdatenführende System ist. Werden Nutzer im LMS gelöscht, so sollten alle zugehörigen Daten (bspw. die persönlichen Einstellungen des Nutzers) auch im ONYX Editor gelöscht werden.
140
141 {{code title="Nutzer löschen"}}
142 @RestMethod
143 public Map<String, String> deleteUser(
144 @RestParam(name = "login") final String login,
145 @RestParam(name = "password") final String password,
146 @RestParam(name = "repo") final String repo,
147 @RestParam(name = "property") final String property,
148 @RestParam(name = "values") final ArrayList<String> values,
149 @RestParam(name = "reason") final String reason,
150 @RestParam(name = "params") final Map<String, String> params) {}
151 {{/code}}
152
153 === Parameter deleteUser ===
154
155 (% class="wrapped" %)
156 |(((
157 login
158 )))|(((
159 Username eines ONYX-Editor-Admin-Nutzers, der das Recht hat, andere Nutzer zu löschen.
160 )))
161 |(((
162 password
163 )))|(((
164 Passwort dieses ONYX-Editor-Admin-Nutzers.
165 )))
166 |(((
167 repo
168 )))|(((
169 ID des LMS-Repositories, so wie diese im LMS bereits konfiguriert ist und zur Kommunikation mit dem ONYX Editor verwendet wird.
170 )))
171 |(((
172 property
173 )))|(((
174 Selektionskriterium der zu löschenden Nutzer. Wenn "uid", dann wird nach dem global gültigen Nutzer-Identifier (Shibboleth-Kriterium) gefiltert, sonst nach den Nutzernamen, die vom LMS in Verbindung mit dem ONYX Editor intern genutzt werden.
175 )))
176 |(((
177 values
178 )))|(((
179 Liste der Werte, nach denen gefiltert wird, bspw. Liste der Nutzernamen.
180 )))
181 |(((
182 reason
183 )))|(((
184 Lösch-Grund. Wird mit ins Lösch-Log geschrieben.
185 )))
186 |(((
187 params
188 )))|(((
189 Aktuell nicht genutzt
190 )))
191
192 === returnValue deleteUser ===
193
194 Löschresultat-Informationen.
195
196 (% class="wrapped" %)
197 |(((
198 Key
199 )))|(((
200 Die Values, wie im Parameter _values_ angegeben
201 )))
202 |(((
203 Value
204 )))|(((
205 Löschresultat (bspw. _NOT FOUND_, _ERROR:xyz_, ...)
206 )))
207 {{/layout-cell}}
208 {{/layout-section}}
209 {{/layout}}
210 {{/sv-translation}}
211
212 {{sv-translation language="en"}}
213 {{layout}}
214 {{layout-section ac:type="two_right_sidebar"}}
215 {{layout-cell}}
216 \\
217 {{/layout-cell}}
218
219 {{layout-cell}}
220 {{scroll-ignore}}
221 {{panel borderColor="#ddd" bgColor="#f0f0f0" borderStyle="solid" title="Content"}}
222
223
224 {{toc/}}
225 {{/panel}}
226 {{/scroll-ignore}}
227 {{/layout-cell}}
228 {{/layout-section}}
229
230 {{layout-section ac:type="single"}}
231 {{layout-cell}}
232 == Save results ==
233
234 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:
235
236 {{code title="Save results"}}
237 @RestMethod(name = "saveResult2")
238 public Boolean saveResult(
239 @RestParam(name = "uniqueId") final String uniqueId,
240 @RestParam(name = "resultFile") final byte[] resultFile,
241 @RestParam(name = "params") final Map<String, String> params) {}
242 {{/code}}
243
244 \\
245
246 === Parameter saveResult2 ===
247
248 |(((
249 uniqueId
250 )))|(((
251 Unique ID used by the ONYX WebPlayer and ONYX Editor when running the test.
252 )))
253 |(((
254 resultFile
255 )))|(((
256 Result file as ZIP file (QTI-compliant result.xml, including any referenced files such as user uploads or user content if necessary)
257 )))
258 |(((
259 params
260 )))|(((
261 Generic parameters. These are currently only stored without further processing.
262 )))
263
264 \\
265
266 === returnValue saveResult2 ===
267
268 |(((
269 boolean
270 )))|(((
271 True if successful, otherwise false
272 )))
273
274 == Save results (legacy) ==
275
276 \\
277
278 {{code title="Save results (legacy)"}}
279 @RestMethod(name = "saveResult")
280 public Boolean saveResult(
281 @RestParam(name = "uniqueId") final String uniqueId,
282 @RestParam(name = "resultFile") final byte[] resultFile) {}
283 {{/code}}
284
285 \\
286
287 === Parameter saveResult2 ===
288
289 |(((
290 uniqueId
291 )))|(((
292 Unique ID used by the ONYX WebPlayer and ONYX Editor when running the test.
293 )))
294 |(((
295 resultFile
296 )))|(((
297 Result file as ZIP file (QTI-compliant result.xml, including any referenced files such as user uploads or user content if necessary)
298 )))
299
300 === returnValue saveResult2 ===
301
302 |(((
303 boolean
304 )))|(((
305 True if successful, otherwise false
306 )))
307
308 \\
309
310 == Query interface version ==
311
312 \\
313
314 {{code title="Query version"}}
315 @RestMethod(name = "version")
316 public String version() {}
317 {{/code}}
318
319 \\
320
321 === Parameter version ===
322
323 None
324
325 \\
326
327 === returnValue saveResult2 ===
328
329 |(((
330 String
331 )))|(((
332 REST interface version, currently always "1.0 (ONYX Editor version)"
333 )))
334
335 \\
336
337 == Delete user ==
338
339 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.
340
341 {{code title="Delete user"}}
342 @RestMethod
343 public Map<String, String> deleteUser(
344 @RestParam(name = "login") final String login,
345 @RestParam(name = "password") final String password,
346 @RestParam(name = "repo") final String repo,
347 @RestParam(name = "property") final String property,
348 @RestParam(name = "values") final ArrayList<String> values,
349 @RestParam(name = "reason") final String reason,
350 @RestParam(name = "params") final Map<String, String> params) {}
351 {{/code}}
352
353 === Parameter deleteUser ===
354
355 |(((
356 login
357 )))|(((
358 User name of an ONYX Editor admin user who has the right to delete other users.
359 )))
360 |(((
361 password
362 )))|(((
363 Password of this ONYX Editor admin user.
364 )))
365 |(((
366 repo
367 )))|(((
368 ID of the LMS repository as it is already configured in the LMS and used for communication with the ONYX Editor.
369 )))
370 |(((
371 property
372 )))|(((
373 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.
374 )))
375 |(((
376 values
377 )))|(((
378 List of values to filter by, for example, list of user names.
379 )))
380 |(((
381 reason
382 )))|(((
383 Reason for deletion. Will be included in the deletion log.
384 )))
385 |(((
386 params
387 )))|(((
388 Currently not used
389 )))
390
391 === returnValue deleteUser ===
392
393 Deletion result information.
394
395 |(((
396 Key
397 )))|(((
398 The values as specified in the _values_ parameter
399 )))
400 |(((
401 Value
402 )))|(((
403 Deletion result (e. g _NOT FOUND_, _ERROR:xyz_, ...)
404 )))
405 {{/layout-cell}}
406 {{/layout-section}}
407 {{/layout}}
408 {{/sv-translation}}