Rev 5769 | Rev 9071 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5769 | Rev 5798 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | wims.cgi. It takes all the http calls to the server, then does the following |
3 | wims.cgi. It takes all the http calls to the server, then does the following |
4 | work: |
4 | work: |
5 | <ol> |
5 | <ol> |
6 | <li>Call the module asked by the user, and process parameters and variables |
6 | <li>Call the module asked by the user, and process parameters and variables |
7 | according to what is defined in the module. |
7 | according to what is defined in the module. |
8 | <li>Session management. |
8 | </li><li>Session management. |
9 | <li>Send the result of the process to the user. |
9 | </li><li>Send the result of the process to the user. |
10 | <li>Write to different log files. |
10 | </li><li>Write to different log files. |
11 | </ol> |
11 | </li></ol> |
12 | 12 | ||
13 | <h4> Modules of wims</h4> |
13 | <h4> Modules of wims</h4> |
14 | 14 | <p> |
|
15 | A wims server is a modular system, with different applications as modules. |
15 | A wims server is a modular system, with different applications as modules. |
16 | At each new call to wims, the user has to specify which module he want to |
16 | At each new call to wims, the user has to specify which module he want to |
17 | access. <p> |
17 | access. </p><p> |
18 | 18 | ||
19 | A wims module may be an interactive course or interactive exercise (of any |
19 | A wims module may be an interactive course or interactive exercise (of any |
20 | level), a computational tool, a dictionary, a mathematical game, a database, |
20 | level), a computational tool, a dictionary, a mathematical game, a database, |
21 | or a mixture of the above. <p> |
21 | or a mixture of the above. </p><p> |
22 | 22 | ||
23 | Wims modules are independent from each other. Each module has its own |
23 | Wims modules are independent from each other. Each module has its own |
24 | directory, which serves as its address, and contains all the files of this |
24 | directory, which serves as its address, and contains all the files of this |
25 | module. Different modules have different authors and different maintainers, |
25 | module. Different modules have different authors and different maintainers, |
26 | and may follow different copyright policies. <p> |
26 | and may follow different copyright policies. </p><p> |
27 | 27 | ||
28 | There is no relation between modules in a same wims site, except hypertext |
28 | There is no relation between modules in a same wims site, except hypertext |
29 | links which allows one module to access another in various ways. |
29 | links which allows one module to access another in various ways. |
30 | 30 | </p> |
|
31 | <h4>How to access a wims server</h4> |
31 | <h4>How to access a wims server</h4> |
32 | 32 | ||
33 | Wims is accessed by a request to the main cgi program, for example |
33 | Wims is accessed by a request to the main cgi program, for example |
34 | <pre> |
34 | <pre> |
35 | http://wims.unice.fr/wims/wims.cgi |
35 | http://wims.unice.fr/wims/wims.cgi |
36 | </pre> |
36 | </pre> |
37 | which usually should be followed by parameters. A call to the main wims.cgi |
37 | which usually should be followed by parameters. A call to the main wims.cgi |
38 | program without parameter will bring up the wims homepage of the site. <p> |
38 | program without parameter will bring up the wims homepage of the site. </p><p> |
39 | 39 | ||
40 | Parameters of wims.cgi is a usual http $emph name=value$emphend pair, where the |
40 | Parameters of wims.cgi is a usual http $emph name=value$emphend pair, where the |
41 | $emph name$emphend field may be one of the following: |
41 | $emph name$emphend field may be one of the following: |
- | 42 | </p> |
|
42 | <ul> |
43 | <ul> |
43 | <li>< |
44 | <li><span style="color:green;">cmd</span>: the value is the command of the call. |
44 | Valid commands: |
45 | Valid commands: |
45 | $table_header |
46 | $table_header |
46 | $table_tr<th>Parameter string<th>Meaning |
47 | $table_tr<th>Parameter string</th><th>Meaning</th></tr> |
47 | $table_tr<td>cmd=intro<td>get |
48 | $table_tr<td>cmd=intro</td><td>get introduction page of the module</td></tr> |
48 | $table_tr<td>cmd=new<td>open |
49 | $table_tr<td>cmd=new</td><td>open new working session</td></tr> |
49 | $table_tr<td>cmd=renew<td>restart |
50 | $table_tr<td>cmd=renew</td><td>restart working session</td></tr> |
50 | $table_tr<td>cmd=reply<td>send |
51 | $table_tr<td>cmd=reply</td><td>send reply to the module</td></tr> |
51 | $table_tr<td>cmd=next<td>get next |
52 | $table_tr<td>cmd=next</td><td>get next exercise (in a working session)</td></tr> |
52 | $table_tr<td>cmd=config<td>set preferences |
53 | $table_tr<td>cmd=config</td><td>set preferences</td></tr> |
53 | $table_tr<td>cmd=help<td>get |
54 | $table_tr<td>cmd=help</td><td>get contextual help</td></tr> |
54 | $table_tr<td>cmd=hint<td>get |
55 | $table_tr<td>cmd=hint</td><td>get contextual hint</td></tr> |
55 | $table_tr<td>cmd=resume<td>resume work (e |
56 | $table_tr<td>cmd=resume</td><td>resume work (e.g. after help)</td></tr> |
56 | $table_tr<td>cmd=getins<td>get dynamic insertions: internal use<br/> |
57 | $table_tr<td>cmd=getins</td><td>get dynamic insertions: internal use<br/> |
57 | by the server. Not to be used by modules. |
58 | by the server. Not to be used by modules.</td></tr> |
58 | </table |
59 | </table> |
59 | <li |
60 | </li><li><span style="color:green;">module</span>. the value is the name of the module |
60 | which the user wants to access. <br/> |
61 | which the user wants to access. <br/> |
61 | <li |
62 | </li><li><span style="color:green;">session</span>: the value is the number of the current |
62 | session of the user. <br/> |
63 | session of the user. <br/> |
63 | The session number is automatically generated by wims.cgi, and is usually |
64 | The session number is automatically generated by wims.cgi, and is usually |
64 | automatically contained in the pages sent by the server. Tampering with this |
65 | automatically contained in the pages sent by the server. Tampering with this |
65 | parameter by the user (e.g. in order to spy into others' work) is not |
66 | parameter by the user (e.g. in order to spy into others' work) is not |
66 | allowed and has practically no chance to get through. |
67 | allowed and has practically no chance to get through. |
67 | <li>< |
68 | </li><li><span style="color:green;">lang</span>: the value defines the prefered language |
68 | of the user. |
69 | of the user. |
69 | <li>< |
70 | </li><li><span style="color:green;">user</span>: the value is the user name (for |
70 | registered users; reserved for internal use). |
71 | registered users; reserved for internal use). |
71 | <li>< |
72 | </li><li><span style="color:green;">useropts</span>: the value contains user options for the |
72 | server. The format is coded and may varie from version to version. |
73 | server. The format is coded and may varie from version to version. |
73 | <li>< |
74 | </li><li><span style="color:green;">worksheet</span>: reserved for internal use, for |
74 | determining user works assigned by worksheets. |
75 | determining user works assigned by worksheets. |
75 | <li>< |
76 | </li><li><span style="color:green;">special_parm</span>: this parameter is reserved for |
76 | special requests (help, etc). |
77 | special requests (help, etc). |
77 | <li>Any variables accepted by the module on which the user is working on (or |
78 | </li><li>Any variables accepted by the module on which the user is working on (or |
78 | wants to work on). |
79 | wants to work on). |
79 | </ul> |
80 | </li></ul> |
80 | 81 | ||
81 | Example: |
82 | Example: |
82 | <pre> |
83 | <pre> |
83 | http://wims.unice.fr/~wims/wims.cgi?cmd=new&+module=tool/algebra/factor.en |
84 | http://wims.unice.fr/~wims/wims.cgi?cmd=new&+module=tool/algebra/factor.en |
84 | </pre> |
85 | </pre> |