Rev 4051 | Rev 5798 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4051 | Rev 5766 | ||
---|---|---|---|
Line 31... | Line 31... | ||
31 | of the pair of parentheses substituted. The result of the substitution |
31 | of the pair of parentheses substituted. The result of the substitution |
32 | will then be used as the name of variable, and finally the whole thing |
32 | will then be used as the name of variable, and finally the whole thing |
33 | will be replaced by the value of the last variable. This allows nested |
33 | will be replaced by the value of the last variable. This allows nested |
34 | substitutions, as well as substitution of a variable which is followed |
34 | substitutions, as well as substitution of a variable which is followed |
35 | by an alphanumeric character. |
35 | by an alphanumeric character. |
36 | <br>Example: if the variable $(emph)i$emphend has value $(emph)3$emphend |
36 | <br/>Example: if the variable $(emph)i$emphend has value $(emph)3$emphend |
37 | and the variable $(emph)alpha3beta$emphend has value $(emph)pi$emphend, |
37 | and the variable $(emph)alpha3beta$emphend has value $(emph)pi$emphend, |
38 | the string<pre>3*$$(alpha$$(i)beta)*x</pre> |
38 | the string<pre>3*$$(alpha$$(i)beta)*x</pre> |
39 | will become<pre>3*pi*x</pre> |
39 | will become<pre>3*pi*x</pre> |
40 | after substitution. |
40 | after substitution. |
41 | <p> |
41 | <p> |
Line 51... | Line 51... | ||
51 | <li>If the character $emph$$$emphend is followed by the left bracket |
51 | <li>If the character $emph$$$emphend is followed by the left bracket |
52 | $emph[$emphend, the matching $emph]$emphend will be located, the content |
52 | $emph[$emphend, the matching $emph]$emphend will be located, the content |
53 | of the pair of brackets substituted then evaluated to a real number value whose |
53 | of the pair of brackets substituted then evaluated to a real number value whose |
54 | precision depends on the value of $emph print_precision$emphend. |
54 | precision depends on the value of $emph print_precision$emphend. |
55 | This value will replace the whole thing |
55 | This value will replace the whole thing |
56 | together with the leading $emph$$$emphend. <br> |
56 | together with the leading $emph$$$emphend. <br/> |
57 | It can be used for array subscripts. |
57 | It can be used for array subscripts. |
58 | <br>Example: if the variable $(emph)i$emphend has value $(emph)3$emphend |
58 | <br/>Example: if the variable $(emph)i$emphend has value $(emph)3$emphend |
59 | and the variables <br> |
59 | and the variables <br/> |
60 | $(emph)a1$emphend has value $(emph)3$emphend and <br> |
60 | $(emph)a1$emphend has value $(emph)3$emphend and <br/> |
61 | $(emph)a2$emphend has value $(emph)pi$emphend, <br> |
61 | $(emph)a2$emphend has value $(emph)pi$emphend, <br/> |
62 | then the string<pre> |
62 | then the string<pre> |
63 | $$(a$$[$$i-1])*x+$$(a$$[$$i-2])</pre>will become<pre> |
63 | $$(a$$[$$i-1])*x+$$(a$$[$$i-2])</pre>will become<pre> |
64 | pi*x+3</pre>after substitution. |
64 | pi*x+3</pre>after substitution. |
65 | <li>If the value of a variable being substituted contains the character |
65 | <li>If the value of a variable being substituted contains the character |
66 | $emph$$$emphend, this value will again be substituted, until no more |
66 | $emph$$$emphend, this value will again be substituted, until no more |
67 | substitution is needed. The server has a built-in limit of nested |
67 | substitution is needed. The server has a built-in limit of nested |
68 | substitutions; infinite nested substitions will violate this limit and |
68 | substitutions; infinite nested substitions will violate this limit and |
69 | generate an error message. |
69 | generate an error message. |
70 | </ul> |
70 | </ul> |
71 | 71 | ||
72 | <hr><h4>Reserved variable names</h4> |
72 | <hr/><h4>Reserved variable names</h4> |
73 | 73 | ||
74 | The following names are reserved for their special meanings. They should not be |
74 | The following names are reserved for their special meanings. They should not be |
75 | used for internal needs of any module. |
75 | used for internal needs of any module. |
76 | 76 | ||
77 | <ul> |
77 | <ul> |
Line 80... | Line 80... | ||
80 | <li>Variables named |
80 | <li>Variables named |
81 | !for i in cmd,module,session,lang,special_parm,user,useropts,worksheet |
81 | !for i in cmd,module,session,lang,special_parm,user,useropts,worksheet |
82 | $emph$i$emphend, |
82 | $emph$i$emphend, |
83 | !next i |
83 | !next i |
84 | are reserved for special parameter passing by the user. A module's variable |
84 | are reserved for special parameter passing by the user. A module's variable |
85 | processing files or phtml files can read but cannot set them. <br> |
85 | processing files or phtml files can read but cannot set them. <br/> |
86 | Refer to the section $emph$title_structure$emphend for the meaning of |
86 | Refer to the section $emph$title_structure$emphend for the meaning of |
87 | these variables. |
87 | these variables. |
88 | <li>The variable $emph no_name$emphend has a special use: <br> |
88 | <li>The variable $emph no_name$emphend has a special use: <br/> |
89 | Parameters in the user query string with no name (for example when the |
89 | Parameters in the user query string with no name (for example when the |
90 | coordinate of a mappable image is passed this way to the http server) will |
90 | coordinate of a mappable image is passed this way to the http server) will |
91 | be registered under this variable. For this reason, it should not be used |
91 | be registered under this variable. For this reason, it should not be used |
92 | for other purposes. |
92 | for other purposes. |
93 | <li>All variable names starting with $emph wims_$emphend will have special |
93 | <li>All variable names starting with $emph wims_$emphend will have special |
Line 112... | Line 112... | ||
112 | $table_tr<td>$emph module_address$emphend<td>e-mail address of the (principal) author |
112 | $table_tr<td>$emph module_address$emphend<td>e-mail address of the (principal) author |
113 | $table_tr<td>$emph module_maintainer$emphend<td>name of the actual maintainer |
113 | $table_tr<td>$emph module_maintainer$emphend<td>name of the actual maintainer |
114 | $table_tr<td>$emph module_maintainer_address$emphend<td>e-mail address of the maintainer |
114 | $table_tr<td>$emph module_maintainer_address$emphend<td>e-mail address of the maintainer |
115 | $table_tr<td>$emph module_copyright$emphend<td>copyright notice of the module |
115 | $table_tr<td>$emph module_copyright$emphend<td>copyright notice of the module |
116 | $table_tr<td>$emph module_version$emphend<td>current version of the module |
116 | $table_tr<td>$emph module_version$emphend<td>current version of the module |
117 | $table_tr<td>$emph module_wims_version$emphend<td>minimal wims version required<br> |
117 | $table_tr<td>$emph module_wims_version$emphend<td>minimal wims version required<br/> |
118 | to run this module |
118 | to run this module |
119 | $table_tr<td>$emph module_language$emphend<td>language of the module<br>(en, fr, de, or ...) |
119 | $table_tr<td>$emph module_language$emphend<td>language of the module<br/>(en, fr, de, or ...) |
120 | $table_tr<td>$emph module_category$emphend<td>category of the module<br> |
120 | $table_tr<td>$emph module_category$emphend<td>category of the module<br/> |
121 | (exercise, tool, course, pedia, recreation, adm, other) |
121 | (exercise, tool, course, pedia, recreation, adm, other) |
122 | $table_tr<td>$emph module_level$emphend<td>level of the module |
122 | $table_tr<td>$emph module_level$emphend<td>level of the module |
123 | $table_tr<td>$emph module_domain$emphend<td>algebra, analysis, geometry, ... |
123 | $table_tr<td>$emph module_domain$emphend<td>algebra, analysis, geometry, ... |
124 | $table_tr<td>$emph module_keywords$emphend<td>keywords, to be placed in the html header |
124 | $table_tr<td>$emph module_keywords$emphend<td>keywords, to be placed in the html header |
125 | $table_tr<td>$emph module_scoring$emphend<td>= yes if the module gives scores according to wims standard |
125 | $table_tr<td>$emph module_scoring$emphend<td>= yes if the module gives scores according to wims standard |
Line 132... | Line 132... | ||
132 | have value "yes" if the module's directory contains the respective |
132 | have value "yes" if the module's directory contains the respective |
133 | .phtml file. These variables are used in the command <tt>!homeref</tt>. |
133 | .phtml file. These variables are used in the command <tt>!homeref</tt>. |
134 | <li>Certain environment variables setup by httpd are readable by wims |
134 | <li>Certain environment variables setup by httpd are readable by wims |
135 | modules under names starting with $emph httpd_$emphend. For example, the |
135 | modules under names starting with $emph httpd_$emphend. For example, the |
136 | environment variable $emph REMOTE_HOST$emphend becomes |
136 | environment variable $emph REMOTE_HOST$emphend becomes |
137 | $emph httpd_REMOTE_HOST$emphend under wims. <br> |
137 | $emph httpd_REMOTE_HOST$emphend under wims. <br/> |
138 | Please refer to httpd protocol specifications for details of such variables. |
138 | Please refer to httpd protocol specifications for details of such variables. |
139 | <li>All variable names starting with $emph ins_$emphend, $emph |
139 | <li>All variable names starting with $emph ins_$emphend, $emph |
140 | insplot_$emphend, $emph instex_$emphend will have special meanings for the |
140 | insplot_$emphend, $emph instex_$emphend will have special meanings for the |
141 | corresponding dynamic insertion engines. A module should read or write them |
141 | corresponding dynamic insertion engines. A module should read or write them |
142 | only for the special meanings they are designed for. |
142 | only for the special meanings they are designed for. |