Wiki source code of 06 Schnittstelle ONYX Editor

Last modified by Carina Enke on 12.12.2025

Show last authors
1 {{section}}
2 {{column width="60%"}}
3
4 {{/column}}
5
6 {{column width="30%"}}
7 {{panel title="Content"}}
8 {{toc start="2"/}}
9 {{/panel}}
10 {{/column}}
11 {{/section}}
12
13 == Save results ==
14
15 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:
16
17 {{code title="Save results"}}
18 @RestMethod(name = "saveResult2")
19 public Boolean saveResult(
20 @RestParam(name = "uniqueId") final String uniqueId,
21 @RestParam(name = "resultFile") final byte[] resultFile,
22 @RestParam(name = "params") final Map<String, String> params) {}
23 {{/code}}
24
25
26 === Parameter saveResult2 ===
27
28 |(((
29 uniqueId
30 )))|(((
31 Unique ID used by the ONYX WebPlayer and ONYX Editor when running the test.
32 )))
33 |(((
34 resultFile
35 )))|(((
36 Result file as ZIP file (QTI-compliant result.xml, including any referenced files such as user uploads or user content if necessary)
37 )))
38 |(((
39 params
40 )))|(((
41 Generic parameters. These are currently only stored without further processing.
42 )))
43
44 === returnValue saveResult2 ===
45
46 |(((
47 boolean
48 )))|(((
49 True if successful, otherwise false
50 )))
51
52 == Save results (legacy) ==
53
54 {{code title="Save results (legacy)"}}
55 @RestMethod(name = "saveResult")
56 public Boolean saveResult(
57 @RestParam(name = "uniqueId") final String uniqueId,
58 @RestParam(name = "resultFile") final byte[] resultFile) {}
59 {{/code}}
60
61
62 === Parameter saveResult2 ===
63
64 |(((
65 uniqueId
66 )))|(((
67 Unique ID used by the ONYX WebPlayer and ONYX Editor when running the test.
68 )))
69 |(((
70 resultFile
71 )))|(((
72 Result file as ZIP file (QTI-compliant result.xml, including any referenced files such as user uploads or user content if necessary)
73 )))
74
75 === returnValue saveResult2 ===
76
77 |(((
78 boolean
79 )))|(((
80 True if successful, otherwise false
81 )))
82
83 == Query interface version ==
84
85 {{code title="Query version"}}
86 @RestMethod(name = "version")
87 public String version() {}
88 {{/code}}
89
90
91 === Parameter version ===
92
93 None
94
95
96 === returnValue saveResult2 ===
97
98 |(((
99 String
100 )))|(((
101 REST interface version, currently always "1.0 (ONYX Editor version)"
102 )))
103
104 == Delete user ==
105
106 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.
107
108 {{code title="Delete user"}}
109 @RestMethod
110 public Map<String, String> deleteUser(
111 @RestParam(name = "login") final String login,
112 @RestParam(name = "password") final String password,
113 @RestParam(name = "repo") final String repo,
114 @RestParam(name = "property") final String property,
115 @RestParam(name = "values") final ArrayList<String> values,
116 @RestParam(name = "reason") final String reason,
117 @RestParam(name = "params") final Map<String, String> params) {}
118 {{/code}}
119
120 === Parameter deleteUser ===
121
122 |(((
123 login
124 )))|(((
125 User name of an ONYX Editor admin user who has the right to delete other users.
126 )))
127 |(((
128 password
129 )))|(((
130 Password of this ONYX Editor admin user.
131 )))
132 |(((
133 repo
134 )))|(((
135 ID of the LMS repository as it is already configured in the LMS and used for communication with the ONYX Editor.
136 )))
137 |(((
138 property
139 )))|(((
140 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.
141 )))
142 |(((
143 values
144 )))|(((
145 List of values to filter by, for example, list of user names.
146 )))
147 |(((
148 reason
149 )))|(((
150 Reason for deletion. Will be included in the deletion log.
151 )))
152 |(((
153 params
154 )))|(((
155 Currently not used
156 )))
157
158 === returnValue deleteUser ===
159
160 Deletion result information.
161
162 |(((
163 Key
164 )))|(((
165 The values as specified in the _values_ parameter
166 )))
167 |(((
168 Value
169 )))|(((
170 Deletion result (e. g _NOT FOUND_, _ERROR:xyz_, ...)
171 )))~{~{/layout-cell}}
172 ~{~{/layout-section}}
173 ~{~{/layout}}