Wiki source code of 06 Schnittstelle ONYX Editor

Last modified by Carina Enke on 13.02.2024

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