Wiki source code of 06 Schnittstelle ONYX Editor

Last modified by Carina Enke on 13.02.2024

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