Rev 13229 | Rev 14180 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 13229 | Rev 13362 | ||
---|---|---|---|
Line 24... | Line 24... | ||
24 | | module | adm/raw | |
24 | | module | adm/raw | |
25 | | ident | sender identifier (a word, according to the definition in `WIMS_HOME/log/classes/.connections/`) | |
25 | | ident | sender identifier (a word, according to the definition in `WIMS_HOME/log/classes/.connections/`) | |
26 | | passwd | sender password (as defined in `WIMS_HOME/log/classes/.connections/`) | |
26 | | passwd | sender password (as defined in `WIMS_HOME/log/classes/.connections/`) | |
27 | | code | a random word. This word will be sent back to the sender, in order to allow it to check whether the result is from the good request. | |
27 | | code | a random word. This word will be sent back to the sender, in order to allow it to check whether the result is from the good request. | |
28 | | job | type of request, see below. | |
28 | | job | type of request, see below. | |
29 | --- |
29 | |
30 | 30 | ||
31 | 31 | ||
32 | And the following parameters may be added according to the type |
32 | And the following parameters may be added according to the type |
33 | of the request. |
33 | of the request. |
34 | 34 | ||
35 | | Name | Value | |
35 | | Name | Value | |
36 | |----------|----------------------------| |
36 | |----------|----------------------------| |
37 | | qclass | identifier of the class on the receiving server. It should be an integer. | |
37 | | qclass | identifier of the class on the receiving server. It should be an integer. | |
38 | | qprogram | | |
38 | | qprogram | | |
39 | | quser | user identifier in the receiving server (when the request concerns a particular user). | |
39 | | quser | user identifier in the receiving server (when the request concerns a particular user). | |
40 | | qsheet | sheet identifier in the receiving server (when the request concerns a particular sheet). | |
40 | | qsheet | sheet identifier in the receiving server (when the request concerns a particular sheet). | |
41 | | rclass | identifier of the class on the sending server. | |
41 | | rclass | identifier of the class on the sending server. | |
42 | | format | Format of the data. | |
42 | | format | Format of the data. | |
43 | | option | Different meaning according to request. | |
43 | | option | Different meaning according to request. | |
44 | | data1 | Different meaning according to request. | |
44 | | data1 | Different meaning according to request. | |
45 | --- |
45 | |
46 | 46 | ||
47 | For example, the following request checks whether the class `12345` exists on |
47 | For example, the following request checks whether the class `12345` exists on |
48 | the WIMS server `wims.unice.fr`, sent by a connecting server called `friend1` (by |
48 | the WIMS server `wims.unice.fr`, sent by a connecting server called `friend1` (by |
49 | wims.unice.fr), with password `abcde`. |
49 | wims.unice.fr), with password `abcde`. |
50 | 50 | ||
51 | `https://wims.unice.fr/wims/wims.cgi?module=adm/raw&ident=friend1&passwd=abcde&code=afdqreaf1r783&job=checkclass&qclass=12345&rclass=myclass` |
51 | `https://wims.unice.fr/wims/wims.cgi?module=adm/raw&ident=friend1&passwd=abcde&code=afdqreaf1r783&job=checkclass&qclass=12345&rclass=myclass` |
52 | 52 | ||
53 | Note that for this check to return OK, the class `12345` on wims.unice.fr must |
53 | Note that for this check to return OK, the class `12345` on wims.unice.fr must |
54 | have declared `friend1/myclass` as connectable. |
54 | have declared `friend1/myclass` as connectable. |
- | 55 | This can be done on an existing class by adding `friend1/myclass` to the `class_connections` parameter in the class `12345` .def file. |
|
- | 56 | ||
- | 57 | _______________________________________________________________________________ |
|
55 | 58 | ||
56 | _______________________________________________________________________________ |
- | |
57 | - | ||
58 | ## Query output |
59 | ## Query output |
59 | 60 | ||
60 | The query output (that is, the result of the http query) is always of |
61 | The query output (that is, the result of the http query) is always of |
61 | text/plain type (even if sometimes the output is a binary file). |
62 | text/plain type (even if sometimes the output is a binary file). |
62 | 63 | ||
Line 66... | Line 67... | ||
66 | word ERROR. If the first line is not as such, then there is a |
67 | word ERROR. If the first line is not as such, then there is a |
67 | serious error in the request or a bug in the server software. |
68 | serious error in the request or a bug in the server software. |
68 | In case the status is OK, the remaining of the output content is the |
69 | In case the status is OK, the remaining of the output content is the |
69 | content of the data. Otherwise the second line contains the nature of |
70 | content of the data. Otherwise the second line contains the nature of |
70 | the error. |
71 | the error. |
71 | 72 | ||
72 | **JSON OUTPUT TYPE** : (recommended) |
73 | **JSON OUTPUT TYPE** : (recommended) |
73 | output values are returned json formatted. (see [http://json.org]() for more |
74 | output values are returned json formatted. (see [http://json.org]() for more |
74 | details) |
75 | details) |
75 | _______________________________________________________________________________ |
76 | _______________________________________________________________________________ |
76 | 77 | ||
77 | ## Types of the requests. |
78 | ## Types of the requests. |
78 | 79 | ||
79 | A request to WIMS can have the following types (defined by the parameter 'job') |
80 | A request to WIMS can have the following types (defined by the parameter 'job') |
80 | 81 | ||
81 | * **job=help** Show this text. |
- | |
82 | - | ||
83 | * **job=checkident** Check whether the connection is accepted. |
- | |
84 | - | ||
85 | * **job=checkclass** Check whether the class accepts connection. |
- | |
86 | - | ||
87 | * **job=checkuser** Check whether the user exists. |
- | |
88 | - | ||
89 | * **job=checksheet** Check whether the sheet exists. |
- | |
90 | - | ||
91 | * **job=addclass** Add a class on the receiving server. |
- | |
92 | - | ||
93 | For this request, `data1` should be a multi-line text defining the |
- | |
94 | properties of the new class. Each line contains a definition in the format |
- | |
95 | `name=value`. (This text must be reformatted for http query string) |
- | |
96 | The following names may be present in the definitions: |
- | |
97 | - | ||
98 | * **mandatory:** |
- | |
99 | * description = name of the class |
- | |
100 | * institution = name of the institution |
- | |
101 | * supervisor = full name of the supervisor |
- | |
102 | * email = contact email address |
- | |
103 | * password = password for user registration |
- | |
104 | * lang = class language (en, fr, es, it, etc) |
- | |
105 | * **optional:** |
- | |
106 | * expiration = class expiration date (yyyymmdd) |
- | |
107 | (optional, defaults to one year later) |
- | |
108 | * limit = limit of number of participants |
- | |
109 | (optional, defaults to 30) |
- | |
110 | * level = level of the class (optional, defaults to H4) |
- | |
111 | Valid levels: E1, E2, ..., E6, H1, ..., H6, |
- | |
112 | U1, ..., U5, G, R |
- | |
113 | * secure = secure hosts |
- | |
114 | * bgcolor = page background color |
- | |
115 | * refcolor = menu background color |
- | |
116 | * css = css file (must be existing css on the WIMS server) |
- | |
117 | - | ||
118 | `data2` should be a multi-line text defining the supervisor account, in the |
- | |
119 | same format as for data1. |
- | |
120 | The following names may be present in the definitions: |
- | |
121 | - | ||
122 | * **mandatory:** |
- | |
123 | * lastname = last name of the supervisor user |
- | |
124 | * firstname = first name of the supervisor user |
- | |
125 | * password = supervisor user's password, non-crypted. |
- | |
126 | * **optional** |
- | |
127 | * email = supervisor email address |
- | |
128 | * comments = any comments |
- | |
129 | * regnum = registration number |
- | |
130 | * photourl = url of a user picture |
- | |
131 | * participate = list classes (if in a class group) where user participates |
- | |
132 | * courses = |
- | |
133 | * classes = |
- | |
134 | * supervise = |
- | |
135 | * supervisable = |
- | |
136 | * external_auth = |
- | |
137 | * agreecgu = Boolean indicating if user accepted CGU |
- | |
138 | * regprop[1..5] = custom properties |
- | |
139 | - | ||
140 | - | ||
141 | * **job=adduser** Add a user to the specified class. |
- | |
142 | - | ||
143 | `data1` should be a multi-line text defining the user account. |
- | |
144 | The following names may be present in the definitions: |
- | |
145 | - | ||
146 | * **mandatory:** |
- | |
147 | * lastname = user's lastname |
- | |
148 | * firstname = user's firstname |
- | |
149 | * password = user's password, non-crypted. |
- | |
150 |
|
82 | ### job=help |
151 | * email = email address |
- | |
152 | * comments = any comments |
- | |
153 | * regnum = registration number |
- | |
154 | * photourl = url of user’s photo |
- | |
155 | * participate = list classes where user participates |
- | |
156 | (only for group and portal) |
- | |
157 | * courses = special for portal |
- | |
158 | * classes = special for portal |
- | |
159 | * supervise = List classes where teacher are administator |
- | |
160 | (only for group and portal) |
- | |
161 | * supervisable = `yes/no` ; give right to the user to supervise a class |
- | |
162 | (only for group and portal) |
- | |
163 | * external_auth = login for external_auth (by cas or shiboleth for example). |
- | |
164 | Not useful for Moodle |
- | |
165 | * agreecgu = if yes, the user will not be asked when he enters |
- | |
166 | for the first time to agree the cgu |
- | |
167 | * regprop[1..5] = custom variables, upon to you |
- | |
168 | (i.e : you can set here an external group for example) |
- | |
169 | - | ||
170 | - | ||
171 | * **job=modclass** Modify the properties of a class. |
- | |
172 | - | ||
173 | `data1` should be a multi-line text containing the properties to be redefined. |
- | |
174 | Only modified properties need to be present in data1. |
- | |
175 | - | ||
176 | - | ||
177 | * **job=moduser** Modify the properties of a user. As modclass. |
- | |
178 | - | ||
179 | * **job=delclass** Delete a class. |
- | |
180 | - | ||
181 | * **job=deluser** Delete a user. |
- | |
182 | - | ||
183 | * **job=recuser** Recover a deleted user. |
- | |
184 | - | ||
185 | * **job=getclass** Get the properties of a class. |
- | |
186 | - | ||
187 | Optionally, the query parameter 'option' may contain the names of fields |
- | |
188 | queried. In this case, only the queried properties are returned. |
- | |
189 | - | ||
190 | Note: definitions for portals have beed added to output variables but are |
- | |
191 |
|
83 | Show this text. |
192 | typename = |
- | |
193 | programs = |
- | |
194 | courses = |
- | |
195 | classes = |
- | |
196 | levels = |
- | |
197 | icourses = |
- | |
198 | subclasses = |
- | |
199 | - | ||
200 | - | ||
201 | * **job=getsheet** Get the properties of a sheet (of a class). |
- | |
202 | - | ||
203 | Optionally, the query parameter 'option' may contain |
- | |
204 | the names of fields queried. In this case, only the |
- | |
205 | queried properties are returned. |
- | |
206 | - | ||
207 | OUTPUT variables: |
- | |
208 | queryclass : the requested class |
- | |
209 | querysheet : the requested sheet |
- | |
210 | sheet_properties : list of properties of the requested sheet |
- | |
211 | (sheet status,expiration date,title,description) |
- | |
212 | exocnt : number of exercices included |
- | |
213 | exotitlelist : list of the exercices included (module:params) |
- | |
214 | - | ||
215 | - | ||
216 | * **job=listsheets** List all the sheets of a class. |
- | |
217 | 84 | ||
218 |
|
85 | ### job=checkident |
219 |
|
86 | Check whether the connection is accepted. |
220 | nbsheet : number of sheets in this class |
- | |
221 | sheettitlelist : list of the sheets with the format "sheet_id:title" |
- | |
222 | 87 | ||
- | 88 | ### job=checkclass |
|
- | 89 | Check whether the class accepts connection. |
|
223 | 90 | ||
- | 91 | ### job=checkuser |
|
224 |
|
92 | Check whether the user exists. |
225 | 93 | ||
226 | Optionally, the query parameter 'option' contains the name of fields related |
- | |
227 |
|
94 | ### job=checksheet |
228 |
|
95 | Check whether the sheet exists. |
229 | 96 | ||
- | 97 | ### job=addclass |
|
- | 98 | Add a class on the receiving server. |
|
230 | 99 | ||
- | 100 | For this request, `data1` should be a multi-line text defining the |
|
231 |
|
101 | properties of the new class. Each line contains a definition in the format |
- | 102 | `name=value`. (This text must be reformatted for http query string) |
|
232 |
|
103 | The following names may be present in the definitions: |
233 | 104 | ||
- | 105 | * **mandatory:** |
|
- | 106 | * description = name of the class |
|
- | 107 | * institution = name of the institution |
|
- | 108 | * supervisor = full name of the supervisor |
|
234 |
|
109 | * email = contact email address |
- | 110 | * password = password for user registration |
|
235 |
|
111 | * lang = class language (en, fr, es, it, etc) |
236 |
|
112 | * **optional:** |
- | 113 | * expiration = class expiration date (yyyymmdd) |
|
- | 114 | (optional, defaults to one year later) |
|
- | 115 | * limit = limit of number of participants |
|
- | 116 | (optional, defaults to 30) |
|
- | 117 | * level = level of the class (optional, defaults to H4) |
|
- | 118 | Valid levels: E1, E2, ..., E6, H1, ..., H6, |
|
- | 119 | U1, ..., U5, G, R |
|
- | 120 | * secure = secure hosts |
|
- | 121 | * bgcolor = page background color |
|
- | 122 | * refcolor = menu background color |
|
- | 123 | * css = css file (must be existing css on the WIMS server) |
|
237 | 124 | ||
- | 125 | `data2` should be a multi-line text defining the supervisor account, in the |
|
- | 126 | same format as for data1. |
|
- | 127 | The following names may be present in the definitions: |
|
238 | 128 | ||
- | 129 | * **mandatory:** |
|
- | 130 | * lastname = last name of the supervisor user |
|
- | 131 | * firstname = first name of the supervisor user |
|
- | 132 | * password = supervisor user's password, non-crypted. |
|
- | 133 | * **optional** |
|
- | 134 | * email = supervisor email address |
|
- | 135 | * comments = any comments |
|
- | 136 | * regnum = registration number |
|
- | 137 | * photourl = url of a user picture |
|
- | 138 | * participate = list classes (if in a class group) where user participates |
|
- | 139 | * courses = |
|
- | 140 | * classes = |
|
- | 141 | * supervise = |
|
- | 142 | * supervisable = |
|
- | 143 | * external_auth = |
|
239 | * |
144 | * agreecgu = Boolean indicating if user accepted CGU |
- | 145 | * regprop[1..5] = custom properties |
|
240 | 146 | ||
241 | Optionally, the query parameter 'option' may contain the names of fields |
- | |
242 | to be queried. In this case, only the queried properties are returned. |
- | |
243 | The output format is as for 'getclass'. |
- | |
244 | 147 | ||
- | 148 | ### job=adduser |
|
- | 149 | Add a user to the specified class. |
|
245 | 150 | ||
246 |
|
151 | `data1` should be a multi-line text defining the user account. |
- | 152 | The following names may be present in the definitions: |
|
247 | 153 | ||
- | 154 | * **mandatory:** |
|
- | 155 | * lastname = user's lastname |
|
- | 156 | * firstname = user's firstname |
|
- | 157 | * password = user's password, non-crypted. |
|
- | 158 | * **optional** |
|
- | 159 | * email = email address |
|
- | 160 | * comments = any comments |
|
- | 161 | * regnum = registration number |
|
- | 162 | * photourl = url of user’s photo |
|
- | 163 | * participate = list classes where user participates |
|
- | 164 | (only for group and portal) |
|
- | 165 | * courses = special for portal |
|
- | 166 | * classes = special for portal |
|
- | 167 | * supervise = List classes where teacher are administator |
|
- | 168 | (only for group and portal) |
|
248 |
|
169 | * supervisable = `yes/no` ; give right to the user to supervise a class |
- | 170 | (only for group and portal) |
|
- | 171 | * external_auth = login for external_auth (by cas or shiboleth for example). |
|
249 |
|
172 | Not useful for Moodle |
- | 173 | * agreecgu = if yes, the user will not be asked when he enters |
|
250 |
|
174 | for the first time to agree the cgu |
- | 175 | * regprop[1..5] = custom variables, upon to you |
|
251 |
|
176 | (i.e : you can set here an external group for example) |
252 | 177 | ||
- | 178 | ||
- | 179 | ### job=modclass |
|
- | 180 | Modify the properties of a class. |
|
- | 181 | ||
- | 182 | `data1` should be a multi-line text containing the properties to be redefined. |
|
- | 183 | Only modified properties need to be present in data1. |
|
- | 184 | ||
- | 185 | ||
- | 186 | ### job=moduser |
|
- | 187 | Modify the properties of a user. As modclass. |
|
- | 188 | ||
- | 189 | ### job=delclass |
|
- | 190 | Delete a class. |
|
- | 191 | ||
- | 192 | ### job=deluser |
|
- | 193 | Delete a user. |
|
- | 194 | ||
- | 195 | ### job=recuser |
|
- | 196 | Recover a deleted user. |
|
- | 197 | ||
- | 198 | ### job=getclass |
|
- | 199 | Get the properties of a class. |
|
- | 200 | ||
- | 201 | Optionally, the query parameter 'option' may contain the names of fields |
|
- | 202 | queried. In this case, only the queried properties are returned. |
|
- | 203 | ||
- | 204 | **Note**: definitions for portals have beed added to output variables but are not yet in addclass: |
|
- | 205 | ||
- | 206 | typename = |
|
- | 207 | programs = |
|
- | 208 | courses = |
|
- | 209 | classes = |
|
- | 210 | levels = |
|
- | 211 | icourses = |
|
- | 212 | subclasses = |
|
- | 213 | ||
- | 214 | ||
- | 215 | ### job=getsheet |
|
- | 216 | Get the properties of a sheet (of a class). |
|
- | 217 | ||
- | 218 | Optionally, the query parameter 'option' may contain |
|
- | 219 | the names of fields queried. In this case, only the |
|
- | 220 | queried properties are returned. |
|
- | 221 | ||
- | 222 | OUTPUT variables: |
|
- | 223 | ||
- | 224 | queryclass : the requested class |
|
- | 225 | querysheet : the requested sheet |
|
- | 226 | sheet_properties : list of properties of the requested sheet |
|
- | 227 | (sheet status,expiration date,title,description) |
|
- | 228 | exocnt : number of exercices included |
|
- | 229 | exotitlelist : list of the exercices included (module:params) |
|
- | 230 | ||
- | 231 | ||
- | 232 | ### job=listsheets |
|
- | 233 | List all the sheets of a class. |
|
- | 234 | ||
- | 235 | OUTPUT variables: |
|
- | 236 | ||
- | 237 | queryclass : the requested class |
|
- | 238 | nbsheet : number of sheets in this class |
|
- | 239 | sheettitlelist : list of the sheets with the format "sheet_id:title" |
|
- | 240 | ||
- | 241 | ||
- | 242 | ### job=listclasses |
|
- | 243 | List all the classes with connection between the `rclass` and `ident/rclass`. |
|
- | 244 | ||
- | 245 | Optionally, the query parameter 'option' contains the name of fields related |
|
- | 246 | to classes asked: |
|
- | 247 | e.g. : option=description,supervisor |
|
- | 248 | ||
- | 249 | ||
- | 250 | ### job=getclassesuser |
|
- | 251 | List all the classes with connection between the rclass and `ident/rclass` where the user exists. |
|
- | 252 | ||
- | 253 | Optionally, the query parameter 'option' may contain the names of fields |
|
- | 254 | queried. In this case, only the queried properties of the classes are |
|
- | 255 | returned. |
|
- | 256 | ||
- | 257 | ||
- | 258 | ### job=getuser |
|
- | 259 | Get the properties of a user (of a class). |
|
- | 260 | ||
- | 261 | Optionally, the query parameter 'option' may contain the names of fields |
|
- | 262 | to be queried. In this case, only the queried properties are returned. |
|
- | 263 | The output format is as for 'getclass'. |
|
- | 264 | ||
- | 265 | ||
- | 266 | ### job=getcsv |
|
- | 267 | Get data of the class, under the form of a csv/tsv spreatsheet file. |
|
- | 268 | ||
- | 269 | The query parameter 'format' may be used to specify the desired output format |
|
- | 270 | (csv or tsv, defaults to csv). |
|
- | 271 | The query parameter 'option' should contain a list of desired data columns. |
|
- | 272 | The following names can be included in 'option', with their respective meanings: |
|
- | 273 | ||
253 |
|
274 | * login : user identifiers |
254 |
|
275 | * password : user passwords (uncrypted) |
255 |
|
276 | * name : user names (last name and first name) |
256 |
|
277 | * lastname : user family names |
257 |
|
278 | * firstname : user given names |
258 |
|
279 | * email : user email addresses |
259 |
|
280 | * regnum : user registration numbers |
260 |
|
281 | * allscore : all score fields (averages and details) |
261 |
|
282 | * averages : score averages (average0, average1, average2) |
262 |
|
283 | * average0 : global score average (as computed by WIMS) |
263 |
|
284 | * average1 : average of scores automatically attributed by WIMS |
264 |
|
285 | * average2 : average of teacher-entered scores |
265 |
|
286 | * exams : exam1+exam2+... |
266 |
|
287 | * exam1, exam2, ...: scores of each exam |
267 |
|
288 | * sheets : sheet1+sheet2+... |
268 |
|
289 | * sheet1, sheet2, ...: scores of each worksheet |
269 |
|
290 | * manuals : manual1+manual2+... |
270 |
|
291 | * manual1, manual2, ...: first, second, ... teacher-entered scores. |
271 | 292 | ||
272 | The output content (below the status line in WIMS format) is a csv/tsv |
293 | The output content (below the status line in WIMS format) is a csv/tsv |
273 | spreadsheet table. The first row of the table contains |
294 | spreadsheet table. The first row of the table contains |
274 | the names of the fields. The second row gives short |
295 | the names of the fields. The second row gives short |
275 | descriptions of each field. The third row is blank. |
296 | descriptions of each field. The third row is blank. |
276 | The rest is the table content, with one row for each user. |
297 | The rest is the table content, with one row for each user. |
277 | 298 | ||
278 | 299 | ||
- | 300 | ### job=lightpopup |
|
279 |
|
301 | Presents an exercise without the top, bottom, and left menu |
280 | 302 | ||
281 |
|
303 | The syntax is `job=lightpopup&emod=MODULE` where `MODULE` is an exercise module with its parameters. |
282 | option: |
- | |
283 | 304 | ||
284 | * about : show "about" which gives author information about the |
- | |
285 | exercise (default) |
- | |
286 |
|
305 | option: |
287 | 306 | ||
- | 307 | * about : show "about" which gives author information about the exercise (default) |
|
288 |
|
308 | * noabout : the "about" will not appear. |
289 | 309 | ||
290 |
|
310 | SAMPLES REQUESTS: |
291 | * http://127.0.0.1/wims/wims.cgi?module=adm/raw&job=lightpopup&emod=H3%2Fanalysis%2Foeflinf.fr&parm=cmd=new;exo=antecedant;qnum=1;qcmlevel=3&option=noabout |
- | |
292 | 311 | ||
- | 312 | * H3/analysis/oeflinf.fr intro in lightpopup mode: |
|
- | 313 | * [http://127.0.0.1/wims/wims.cgi?module=adm/raw&job=lightpopup&emod=H3%2Fanalysis%2Foeflinf.fr]() |
|
293 | 314 | ||
294 |
|
315 | * "antecedant" exercice from H3/analysis/oeflinf.fr module in lightpopup mode: |
- | 316 | * [http://127.0.0.1/wims/wims.cgi?module=adm/raw&job=lightpopup&emod=H3%2Fanalysis%2Foeflinf.fr&parm=cmd=new;exo=antecedant;qnum=1;qcmlevel=3&option=noabout]() |
|
295 | 317 | ||
296 | The data to put is sent as the value of the query parameter `data1`, in the |
- | |
297 | same format as for the query 'getcsv' above. And with the following |
- | |
298 | particularities: |
- | |
299 | Field `login` must be present. |
- | |
300 | The second row (short descriptions) is not necessary. |
- | |
301 | WIMS-attributed scores cannot be uploaded, and will be ignored. |
- | |
302 | If all the necessary fields corresponding to user properties (lastname, |
- | |
303 | firstname, password, etc.) are present, non-existent users will be |
- | |
304 | added to the class. This can be used to install the whole user accounts |
- | |
305 | of the class with one request. |
- | |
306 | 318 | ||
- | 319 | ### job=putcsv |
|
- | 320 | Put data into the class. |
|
307 | 321 | ||
- | 322 | The data to put is sent as the value of the query parameter `data1`, in the |
|
- | 323 | same format as for the query `getcsv` above. And with the following |
|
- | 324 | particularities: |
|
- | 325 | Field `login` must be present. |
|
- | 326 | The second row (short descriptions) is not necessary. |
|
- | 327 | WIMS-attributed scores cannot be uploaded, and will be ignored. |
|
- | 328 | If all the necessary fields corresponding to user properties (lastname, |
|
- | 329 | firstname, password, etc.) are present, non-existent users will be |
|
308 |
|
330 | added to the class. This can be used to install the whole user accounts |
- | 331 | of the class with one request. |
|
309 | 332 | ||
310 | 333 | ||
- | 334 | ### job=getlog |
|
- | 335 | Get the detailed activity registry of a user. |
|
- | 336 | ||
- | 337 | ||
- | 338 | ### job=gettime |
|
311 |
|
339 | Get the current time of the server |
312 | 340 | ||
313 | Can be used for synchronization purposes. |
341 | Can be used for synchronization purposes. |
314 | 342 | ||
315 | 343 | ||
- | 344 | ### job=update |
|
316 |
|
345 | Ask WIMS to update data in a class. |
317 | 346 | ||
318 |
|
347 | Upon reception of this request, WIMS server will issue queries back to the |
319 |
|
348 | remote server, in order to get the up-to-date information and update the |
320 |
|
349 | class. |
321 |
|
350 | The query parameter 'option' contains the nature of the update request. |
322 |
|
351 | It may be one of the following: |
323 | 352 | ||
324 | * class : update class properties (corresponding to modclass) |
353 | * class : update class properties (corresponding to modclass) |
325 | * user : update properties of a user (moduser) |
354 | * user : update properties of a user (moduser) |
326 | * scores : teacher-entered scores (putcsv) |
355 | * scores : teacher-entered scores (putcsv) |
327 | 356 | ||
328 | 357 | ||
- | 358 | ### job=authuser |
|
329 |
|
359 | Get an authentification for a user. |
330 | 360 | ||
331 |
|
361 | User's password is not required. |
332 |
|
362 | Accepts the query parameter `option=hashlogin`: |
333 |
|
363 | If called with option=hashlogin, `quser` should be the external |
334 |
|
364 | identification of user and the function hashlogin is called to convert |
335 |
|
365 | such id to a WIMS login. If the user exists in class, it returns a |
336 |
|
366 | session number as above. If the user does not exists, the WIMS login is |
337 |
|
367 | returned in the error message. |
338 | 368 | ||
339 | OUTPUT : |
369 | OUTPUT : |
340 | 370 | ||
341 | * wims_session : a session number under which the user can connect |
371 | * wims_session : a session number under which the user can connect |
342 | with no need of further authentification |
372 | with no need of further authentification |
343 | * home_url : a complete URL to connect as authentified. |
373 | * home_url : a complete URL to connect as authentified. |
344 | 374 | ||
345 | 375 | ||
- | 376 | ### job=addsheet |
|
346 |
|
377 | Add a new sheet to the specified class `qclass`. |
- | 378 | ||
- | 379 | `data1` may be defined as a multi-line text defining the sheet defs |
|
- | 380 | The following names may be present in the definitions: |
|
347 | 381 | ||
348 | `data1` may be defined as a multi-line text defining the sheet defs |
- | |
349 | The following names may be present in the definitions: |
- | |
350 | (mandatory) |
- | |
351 |
|
382 | **(optional)** |
352 | 383 | ||
353 | * title = name of the sheet (defaults to "sheet n#") |
384 | * title = name of the sheet (defaults to "sheet n#") |
354 | * description = description of the sheet (defaults to "sheet n#") |
385 | * description = description of the sheet (defaults to "sheet n#") |
355 | * expiration = expiration date (yyyymmdd) defaults to one year later |
386 | * expiration = expiration date (yyyymmdd) defaults to one year later |
356 | * sheetmode = the mode of the sheet: |
387 | * sheetmode = the mode of the sheet: |
Line 366... | Line 397... | ||
366 | interpreted as new lines. Equal characters (=) must |
397 | interpreted as new lines. Equal characters (=) must |
367 | be replaced by the character AT (@). |
398 | be replaced by the character AT (@). |
368 | There is no check made, so the integrity of the |
399 | There is no check made, so the integrity of the |
369 | contents is up to you only! (defaults to "") |
400 | contents is up to you only! (defaults to "") |
370 | 401 | ||
371 |
|
402 | **OUTPUT** : |
372 | 403 | ||
373 | * queryclass : the requested class |
404 | * queryclass : the requested class |
374 | * sheet_id : id of the new created sheet |
405 | * sheet_id : id of the new created sheet |
375 | 406 | ||
376 | 407 | ||
- | 408 | ### job=addexam |
|
377 |
|
409 | Add a new exam to the specified class `qclass`. |
378 |
|
410 | `data1` may be defined as a multi-line text defining the sheet defs, with the same parameters as in addsheet (see above), plus these additional optional parameters: |
- | 411 | ||
- | 412 | * duration = exam duration |
|
- | 413 | * attempts = number of authorized attempts |
|
- | 414 | * cut_hours = Cut hours (format : `yyyymmdd.hh:mm` (separate several hours by spaces). |
|
- | 415 | * opening = Opening Restrictions (IP ranges / Schedules) opening can set a time restriction for recording notes by adding the words > yyyymmdd.hh:mm (start) and/or < yyyymmdd.hh:mm (end). Dates and times must be in server local time and must be separated by spaces. |
|
- | 416 | ||
- | 417 | ||
- | 418 | ### job=addexo |
|
- | 419 | Add the source file (data1) of an exercise directly to the class, under the name `qexo` |
|
- | 420 | ||
379 | 421 | ||
380 |
|
422 | ### job=putexo |
381 | * attempts = number of authorized attempts |
- | |
382 |
|
423 | Add content (an existing exercise) to the sheet `qsheet` of the `qclass` class |
383 |
|
424 | `data1` may be defined as a multi-line text defining the exo defs, according to these parameters: |
384 | 425 | ||
- | 426 | * **mandatory** |
|
- | 427 | * module = the module where comes the erexercice from |
|
- | 428 | * **optional** |
|
- | 429 | * params = list of parameters to add to the module |
|
- | 430 | * points = number of requested points |
|
- | 431 | * weight = Weight of the exercise |
|
- | 432 | * title = title of the exercise in the sheet |
|
- | 433 | * description = description of the exercise in the sheet |
|
385 | 434 | ||
386 | * **job=addexo** Add the source file (data1) of an exercise directly to the class, under the name `qexo` |
- | |
387 | 435 | ||
- | 436 | ### job=modsheet |
|
- | 437 | Modify an existing sheet in the specified class. |
|
388 | 438 | ||
389 | * **job=putexo** Add content (an existing exercise) to the sheet `qsheet` of the `qclass` class |
- | |
390 |
|
439 | `data1` may be defined as a multi-line text defining the sheet defs |
391 |
|
440 | (cf addsheet) |
392 | * module = the module where comes the erexercice from |
- | |
393 | * **optional** |
- | |
394 | * params = list of parameters to add to the module |
- | |
395 | * points = number of requested points |
- | |
396 | * weight = Weight of the exercise |
- | |
397 | * title = title of the exercise in the sheet |
- | |
398 | * description = description of the exercise in the sheet |
- | |
399 | 441 | ||
400 | 442 | ||
- | 443 | ### job=listexos |
|
401 |
|
444 | Lists all exercices presents in class `qclass` |
402 | 445 | ||
403 | `data1` may be defined as a multi-line text defining the sheet defs |
- | |
404 | (cf addsheet) |
- | |
405 | 446 | ||
- | 447 | ### job=movexo |
|
- | 448 | Moves exercice `qexo` from class `qclass` to class `data1` |
|
406 | 449 | ||
407 |
|
450 | Condition : Both 2 classes must be linked by `rclass` |
408 | 451 | ||
- | 452 | *option*: you can use `copy` to copy file instead of moving it. |
|
409 | 453 | ||
410 | * **job=movexo** Moves exercice `qexo` from class `qclass` to class `data1` |
- | |
411 | 454 | ||
- | 455 | ### job=movexos |
|
412 |
|
456 | Moves ALL exercice from class `qclass` to class `data1` |
413 | 457 | ||
414 |
|
458 | Condition: Both 2 classes must be linked by `rclass` |
415 | 459 | ||
- | 460 | *option*: you can use `copy` to copy files instead of moving them. |
|
416 | 461 | ||
417 | * **job=movexos** Moves ALL exercice from class `qclass` to class `data1` |
- | |
418 | 462 | ||
419 |
|
463 | ### job=sharecontent |
420 |
|
464 | Declare neighbour classes, allowing class "qclass" to share content with class "data1" |
421 | 465 | ||
- | 466 | Condition: Both 2 classes must be linked by `rclass` |
|
422 | 467 | ||
423 |
|
468 | The `option` parameter can be used to declare which type of content to share |
- | 469 | (currently, only the "exo" content type is supported) |
|
424 | 470 | ||
425 | Condition: Both 2 classes must be linked by `rclass` |
- | |
426 | The `option` parameter can be used to declare which type of content to share |
- | |
427 | (currently, only the "exo" content type is supported) |
- | |
428 | 471 | ||
- | 472 | ### job=linksheet |
|
- | 473 | Add all exercices from sheet `qsheet` to exam `qexam` |
|
429 | 474 | ||
430 | * **job=linksheet** Add all exercices from sheet `qsheet` to exam `qexam` |
- | |
431 | 475 | ||
- | 476 | ### job=getscore |
|
- | 477 | Get all scores from user `quser` (optionaly, you can filter with sheet `qsheet`) |
|
432 | 478 | ||
433 | * **job=getscore** Get all scores from user `quser` (optionaly, you can filter with sheet `qsheet`) |
- | |
434 | 479 | ||
- | 480 | ### job=getsheetscores |
|
- | 481 | Get all scores from sheet `qsheet` - JSON OUTPUT only |
|
435 | 482 | ||
436 | * **job=getsheetscores** Get all scores from sheet `qsheet` - JSON OUTPUT only |
- | |
437 | 483 | ||
- | 484 | ### job=getexamscores |
|
- | 485 | Get all scores from exam `qexam` - JSON OUTPUT only |
|
438 | 486 | ||
439 | * **job=getexamscores** Get all scores from exam `qexam` - JSON OUTPUT only |
- | |
440 | 487 | ||
441 | --- |
488 | --- |