Rev 17228 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 17228 | Rev 17238 | ||
---|---|---|---|
Line 2... | Line 2... | ||
2 | <h4>Definition and substitution of variables</h4> |
2 | <h4>Definition and substitution of variables</h4> |
3 | 3 | ||
4 |
|
4 | WIMS variables have only one type: they are all string variables. Numerical |
5 | evaluation can be done on variables via the variable command |
5 | evaluation can be done on variables via the variable command |
6 | $(ref1)cmdlist_eval_&+cmd_choose=all$(ref2)cmdlist_eval_">!eval</a>. |
6 | $(ref1)cmdlist_eval_&+cmd_choose=all$(ref2)cmdlist_eval_">!eval</a>. |
7 | <p> |
7 | <p> |
8 | A variable may be defined or modified in a variable processing file, or by |
8 | A variable may be defined or modified in a variable processing file, or by |
9 | the commands |
9 | the commands |
Line 92... | Line 92... | ||
92 | Parameters in the user query string with no name (for example when the |
92 | Parameters in the user query string with no name (for example when the |
93 | coordinate of a mappable image is passed this way to the http server) will |
93 | coordinate of a mappable image is passed this way to the http server) will |
94 | be registered under this variable. For this reason, it should not be used |
94 | be registered under this variable. For this reason, it should not be used |
95 | for other purposes. |
95 | for other purposes. |
96 | </li><li>All variable names starting with $emph wims_$emphend will have special |
96 | </li><li>All variable names starting with $emph wims_$emphend will have special |
97 | meanings for |
97 | meanings for WIMS server. A module should read or write them only for the |
98 | special meanings they are designed for. |
98 | special meanings they are designed for. |
99 | </li><li>Variable names starting with $emph m_$emphend are reserved for inline |
99 | </li><li>Variable names starting with $emph m_$emphend are reserved for inline |
100 | mathematical fonts. The module programmer may redefine them, but then their |
100 | mathematical fonts. The module programmer may redefine them, but then their |
101 | original meaning will be lost. |
101 | original meaning will be lost. |
102 | </li><li>The variable $emph module_dir$emphend has a value preset to the directory |
102 | </li><li>The variable $emph module_dir$emphend has a value preset to the directory |
Line 115... | Line 115... | ||
115 | $table_tr<td>$emph module_address$emphend</td><td>e-mail address of the (principal) author</td></tr> |
115 | $table_tr<td>$emph module_address$emphend</td><td>e-mail address of the (principal) author</td></tr> |
116 | $table_tr<td>$emph module_maintainer$emphend</td><td>name of the current maintainer</td></tr> |
116 | $table_tr<td>$emph module_maintainer$emphend</td><td>name of the current maintainer</td></tr> |
117 | $table_tr<td>$emph module_maintainer_address$emphend</td><td>e-mail address of the maintainer</td></tr> |
117 | $table_tr<td>$emph module_maintainer_address$emphend</td><td>e-mail address of the maintainer</td></tr> |
118 | $table_tr<td>$emph module_copyright$emphend</td><td>copyright notice of the module</td></tr> |
118 | $table_tr<td>$emph module_copyright$emphend</td><td>copyright notice of the module</td></tr> |
119 | $table_tr<td>$emph module_version$emphend</td><td>current version of the module</td></tr> |
119 | $table_tr<td>$emph module_version$emphend</td><td>current version of the module</td></tr> |
120 | $table_tr<td>$emph module_wims_version$emphend</td><td>minimal |
120 | $table_tr<td>$emph module_wims_version$emphend</td><td>minimal WIMS version required<br> |
121 | to run this module</td></tr> |
121 | to run this module</td></tr> |
122 | $table_tr<td>$emph module_language$emphend</td><td>language of the module<br>(en, fr, de, or ...)</td></tr> |
122 | $table_tr<td>$emph module_language$emphend</td><td>language of the module<br>(en, fr, de, or ...)</td></tr> |
123 | $table_tr<td>$emph module_category$emphend</td><td>category of the module<br> |
123 | $table_tr<td>$emph module_category$emphend</td><td>category of the module<br> |
124 | (exercise, tool, course, pedia, recreation, adm, other)</td></tr> |
124 | (exercise, tool, course, pedia, recreation, adm, other)</td></tr> |
125 | $table_tr<td>$emph module_level$emphend</td><td>level of the module</td></tr> |
125 | $table_tr<td>$emph module_level$emphend</td><td>level of the module</td></tr> |
126 | $table_tr<td>$emph module_domain$emphend</td><td>algebra, analysis, geometry, ...</td></tr> |
126 | $table_tr<td>$emph module_domain$emphend</td><td>algebra, analysis, geometry, ...</td></tr> |
127 | $table_tr<td>$emph module_keywords$emphend</td><td>keywords, to be placed in the html header</td></tr> |
127 | $table_tr<td>$emph module_keywords$emphend</td><td>keywords, to be placed in the html header</td></tr> |
128 | $table_tr<td>$emph module_scoring$emphend</td><td>= yes if the module gives scores according to |
128 | $table_tr<td>$emph module_scoring$emphend</td><td>= yes if the module gives scores according to WIMS standard</td></tr> |
129 | $table_tr<td>$emph module_data$emphend</td><td>address of datamodule</td></tr> |
129 | $table_tr<td>$emph module_data$emphend</td><td>address of datamodule</td></tr> |
130 | 130 | ||
131 | $table_end |
131 | $table_end |
132 | Also, variables $emph module_has_intro$emphend, |
132 | Also, variables $emph module_has_intro$emphend, |
133 | $emph module_has_help$emphend and |
133 | $emph module_has_help$emphend and |
134 | $emph module_has_about$emphend |
134 | $emph module_has_about$emphend |
135 | have value "yes" if the module's directory contains the respective |
135 | have value "yes" if the module's directory contains the respective |
136 | .phtml file. These variables are used in the command <span class="tt">!homeref</span>. |
136 | .phtml file. These variables are used in the command <span class="tt">!homeref</span>. |
137 | </li><li>Some environment variables setup by httpd are readable by |
137 | </li><li>Some environment variables setup by httpd are readable by WIMS |
138 | modules under names starting with $emph httpd_$emphend. For example, the |
138 | modules under names starting with $emph httpd_$emphend. For example, the |
139 | environment variable $emph REMOTE_HOST$emphend becomes |
139 | environment variable $emph REMOTE_HOST$emphend becomes |
140 | $emph httpd_REMOTE_HOST$emphend under |
140 | $emph httpd_REMOTE_HOST$emphend under WIMS. <br> |
141 | Please refer to httpd protocol specifications for details of such variables. |
141 | Please refer to httpd protocol specifications for details of such variables. |
142 | </li><li>All variable names starting with $emph ins_$emphend, $emph |
142 | </li><li>All variable names starting with $emph ins_$emphend, $emph |
143 | insplot_$emphend, $emph instex_$emphend will have special meanings for the |
143 | insplot_$emphend, $emph instex_$emphend will have special meanings for the |
144 | corresponding dynamic insertion engines. A module should read or write them |
144 | corresponding dynamic insertion engines. A module should read or write them |
145 | only for the special meanings they are designed for. |
145 | only for the special meanings they are designed for. |