Wiki-Quellcode von Schnittstelle ONYX Editor

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