Rev 12515 | Rev 12595 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1193 | bpr | 1 | !!##preparation of the "bottom menu" |
16 | reyssat | 2 | |
8597 | obado | 3 | !if _check isin $session or $wims_mode=popup |
16 | reyssat | 4 | !exit |
5 | !endif |
||
6 | |||
7 | !if _test isin $session and $wims_hacked_variables!=$empty |
||
11268 | obado | 8 | <p><span class="wims_warning">WIMS WARNING</span>. The following variables of your module could be hacked |
9 | by students using manually modified http addresses! You might want to put more |
||
10 | strict permissions to them in var.def, in order to build a secure exercise module. |
||
11 | </p> |
||
12 | <pre>$wims_hacked_variables</pre> |
||
16 | reyssat | 13 | !endif |
14 | |||
2373 | bpr | 15 | !read name.phtml.$lang |
9309 | bpr | 16 | !read themes/$wims_theme/name.phtml.$lang |
16 | reyssat | 17 | !default wims_homeref_bgcolor=$wims_ref_bgcolor |
4635 | bpr | 18 | !read themes/$wims_theme/local.phtml |
10057 | bpr | 19 | |
16 | reyssat | 20 | !if exam isin $wims_session |
11268 | obado | 21 | !read examclock.proc |
22 | !goto rmend |
||
16 | reyssat | 23 | !endif |
24 | |||
1193 | bpr | 25 | !if $wims_rm_1=no |
26 | !reset wims_rm_1 |
||
27 | !goto local |
||
28 | !endif |
||
16 | reyssat | 29 | !if $wims_rm_1!=$empty |
30 | !goto rm2 |
||
31 | !endif |
||
32 | !reset 1_ |
||
4346 | bpr | 33 | |
34 | !!********* Link #1 : "Close Window" or "Home" (Not Shown if Embedded) |
||
16 | reyssat | 35 | !if _ isin $wims_subsession |
9800 | bpr | 36 | !!set 1_=!append line back2,3,window.close() to $1_ |
16 | reyssat | 37 | !else |
9800 | bpr | 38 | !!set 1_=!append line class_home,1,session=$wims_session.1 to $1_ |
16 | reyssat | 39 | !endif |
2865 | guerimand | 40 | |
4346 | bpr | 41 | !!********* Link #2 : "Sheet" |
2865 | guerimand | 42 | !if $wims_sheet>0 or P isin $wims_sheet |
43 | !if $wims_sheet>0 |
||
44 | !set tmp_=sheetmanagement,1,module=adm/class/sheet&sheet=$wims_sheet |
||
45 | !else |
||
46 | !set tmp_=sheet,1,module=adm/sheet&sh=$wims_sheet& |
||
47 | !endif |
||
8597 | obado | 48 | !if yes notin $wims_lightpopup |
49 | !set 1_=!append line $tmp_ to $1_ |
||
50 | !endif |
||
2865 | guerimand | 51 | !let wims_menu_items=!append line $tmp_ to $wims_menu_items |
52 | !if $wims_exo>1 |
||
53 | !let wims_menu_items=!append line previousseries,1,module=home&directworksheet=$wims_sheet.$[$wims_exo-1] to $wims_menu_items |
||
54 | !endif |
||
55 | !if $wims_exo<$wims_sheetmax |
||
56 | !let wims_menu_items=!append line nextseries,1,module=home&directworksheet=$wims_sheet.$[$wims_exo+1] to $wims_menu_items |
||
57 | !endif |
||
678 | guerimand | 58 | !endif |
4635 | bpr | 59 | |
4528 | bpr | 60 | !if $wims_sheet>0 or P isin $wims_sheet |
61 | !if $(wims_exofeedback[$wims_exo;])!=$empty |
||
62 | !set feedexo=$(wims_exofeedback[$wims_exo;]) |
||
10057 | bpr | 63 | !if $module_score!=$empty and $module_score < $(feedexo[2]) and $module_score >= $(feedexo[3]) |
64 | !if $(feedexo[3])=0 or $(feedexo[3])=$empty |
||
6298 | bpr | 65 | !set 5_=!append line feedbackexo,7,$(feedexo[1]),mfeed to $5_ |
66 | !else |
||
6606 | bpr | 67 | !set 5_=!append line feedbackplus,7,$(feedexo[1]),mfeed to $5_ |
6298 | bpr | 68 | !endif |
4528 | bpr | 69 | !endif |
7182 | bpr | 70 | !endif |
4528 | bpr | 71 | !endif |
2865 | guerimand | 72 | |
4346 | bpr | 73 | !!********* Link #3 : "Resume" |
16 | reyssat | 74 | !if $cmd=help or $cmd=hint |
75 | !set 1_=!append line resume,1,cmd=resume to $1_ |
||
76 | !endif |
||
4346 | bpr | 77 | |
78 | !!********* Link #4 : "Introduction" (Not Shown if Embedded) |
||
16 | reyssat | 79 | !if $module_has_intro=yes and $cmd notwordof intro help and\ |
80 | $wims_sheet=$empty and exam notin $wims_session |
||
9800 | bpr | 81 | !!set 1_=!append line intro,1,module=$module&cmd=intro&special_parm=$special_parm&special_parm2=$special_parm2&special_parm3=$special_parm3&special_parm4=$special_parm4 to $1_ |
16 | reyssat | 82 | !endif |
4346 | bpr | 83 | |
84 | !!********* Link #5 : "Help" |
||
16 | reyssat | 85 | !if $module_has_help=yes and $cmd notwordof intro help |
86 | !if $module_help=$empty or $module_help=popup |
||
9800 | bpr | 87 | !!set 1_=!append line help,4,module=$module&cmd=help&special_parm=$wims_help_parm,mhelp to $1_ |
16 | reyssat | 88 | !else |
9800 | bpr | 89 | !!set 1_=!append line help,1,module=$module&cmd=help&special_parm=$wims_help_parm to $1_ |
16 | reyssat | 90 | !endif |
91 | !endif |
||
4346 | bpr | 92 | |
93 | !!********* Link #6 : "About" |
||
16 | reyssat | 94 | !if $module_has_about=yes and $cmd notwordof help intro |
9800 | bpr | 95 | !!set 1_=!append line about,4,module=$module&cmd=help&special_parm=about,mhelp to $1_ |
16 | reyssat | 96 | !endif |
9800 | bpr | 97 | |
1193 | bpr | 98 | !if print isin $job,$job2 or $print!= |
99 | !set 1_=!append line print,3,window.print() to $1_ |
||
100 | !endif |
||
1202 | bpr | 101 | !set wims_rm_1=$1_ |
8597 | obado | 102 | |
1202 | bpr | 103 | :local |
104 | !reset 1_ |
||
10057 | bpr | 105 | !if $wims_sheet!=$empty or _exam isin $wims_session |
106 | !set 1_=!append line itemsep,0,\ |
||
107 | tools,4,module=home,tool\ |
||
108 | to $1_ |
||
109 | !endif |
||
110 | |||
1193 | bpr | 111 | !if $wims_developer!=$empty and COPYING isin $module_copyright and ../classes/ notin ../$module |
112 | !set V_=!char 1 of $module |
||
113 | !set M_=!translate internal / to , in $module |
||
114 | !set M_=!item 1 of $M_ |
||
115 | !if $V_ isin ABCDEFGHIJKLMNOPQRTSUVWXYZ or $M_ iswordof local contrib tool |
||
116 | !set 1_=!append line modify,1,module=adm/modtool&original=$module to $1_ |
||
117 | !endif |
||
118 | !endif |
||
12370 | bpr | 119 | |
120 | !if $wims_user=supervisor and ((_adm/doc notin _$module and adddoc notin $module and (document iswordof $module_category or tool iswordof $module_category))\ |
||
121 | or _c isin _$doc) |
||
122 | !if document iswordof $module_category or _c isin _$doc |
||
2080 | bpr | 123 | !set wims_homeref_parm=block=$block&doc=$doc |
124 | !endif |
||
12569 | bpr | 125 | !if adm/tool/glossary isin $module |
126 | !if $gl=0 and $special_parm!=$empty |
||
127 | !set wims_homeref_parm=!getopt gloss_item in $module_init_parm |
||
128 | !set 1_=!append line addglossary,1,module=adm/class/glossary&job=add&iniparm=$wims_homeref_parm to $1_ |
||
129 | !endif |
||
130 | !else |
||
131 | !if _c notin _$doc |
||
132 | !set 1_=!append line adddoc,1,module=adm/class/adddoc&job=add&dir=$module&iniparm=$wims_homeref_parm to $1_ |
||
133 | !endif |
||
12370 | bpr | 134 | !endif |
5211 | guerimand | 135 | !set 1_=!append line addh,1,module=adm/class/addmodule&job=helpexo&dir=$module&iniparm=$wims_homeref_parm to $1_ |
2080 | bpr | 136 | !endif |
10321 | bpr | 137 | !if $wims_user=supervisor and $module=adm/doc |
138 | !set 1_=!append line doch_docs,1,module=adm/doc&job=home to $1_ |
||
139 | !endif |
||
1980 | guerimand | 140 | !if $special_parm4=$empty |
12515 | bpr | 141 | !if $cmd!=intro and $cmd!=help and $module!=home and \ |
142 | ../adm/ notin ../$module and \ |
||
143 | (../devel/ notin ../$module or $wims_devel_modules iswordof open) \ |
||
144 | and exercise isin $module_category |
||
145 | !set wims_homeref_parm=!replace % by %25 in $module_init_parm |
||
146 | !set wims_homeref_parm=!replace + by %2B in $wims_homeref_parm |
||
147 | !set wims_homeref_parm=!replace & by %26 in $wims_homeref_parm |
||
148 | !set 1_=!append line add,1,module=adm/class/addmodule&dir=$module&scoring=$module_scoring&iniparm=$wims_homeref_parm to $1_ |
||
149 | !set 1_=!append line addh,1,module=adm/class/addmodule&job=helpexo&dir=$module&scoring=$module_scoring&iniparm=$wims_homeref_parm to $1_ |
||
150 | !endif |
||
151 | !if $wims_user=supervisor and exam notin $session and \ |
||
152 | ..classes/ notin ..$module and ..adm/ notin ..$module and \ |
||
153 | ..devel/ notin ..$module and \ |
||
154 | GNU isin $module_copyright and \ |
||
155 | _check notin $session and \ |
||
156 | $class_importation!=no and\ |
||
157 | $thisexo!= |
||
158 | !set 1_=!append line import,1,module=adm/createxo&existing=$thisexo&catmodule=$module to $1_ |
||
159 | !endif |
||
7182 | bpr | 160 | |
1980 | guerimand | 161 | !else |
12515 | bpr | 162 | !! ----- place pour ajouter le lien vers la modification de serie dans une feuille |
163 | !if $cmd!=intro and $cmd!=help and $module!=home and \ |
||
164 | ../adm/ notin ../$module and \ |
||
165 | (../devel/ notin ../$module or $wims_devel_modules iswordof open) |
||
166 | !set wims_homeref_parm=!replace % by %25 in $module_init_parm |
||
167 | !set wims_homeref_parm=!replace + by %2B in $wims_homeref_parm |
||
168 | !set wims_homeref_parm=!replace & by %26 in $wims_homeref_parm |
||
169 | !set 1_=!append line chseries,1,module=adm/class/sheet&dir=$module&scoring=$module_scoring&iniparm=$wims_homeref_parm&job=chseries&num=$special_parm4 to $1_ |
||
170 | !endif |
||
1980 | guerimand | 171 | !endif |
9703 | bpr | 172 | !! add module links to general links with a separation |
10285 | bpr | 173 | !if $wims_menu_items!=$empty |
174 | !set 1_=!append line itemsep,0,\ |
||
9703 | bpr | 175 | $wims_menu_items to $1_ |
10285 | bpr | 176 | !endif |
9281 | bpr | 177 | !if $wims_user=supervisor and $cmd!=intro and $cmd!=help and $module!=home and \ |
12515 | bpr | 178 | ../adm/ notin ../$module and ($module_category!=document or $job=exosource)\ |
179 | and $module_category!=help |
||
180 | !!last condition is for the uniq module help/main.$lang |
||
10039 | bpr | 181 | !if $job=exosource |
182 | !set tmp=back2 |
||
183 | !if $block!=$empty |
||
184 | !set docbl=block=$block |
||
185 | !else |
||
186 | !reset docbl |
||
187 | !endif |
||
188 | !else |
||
189 | !set tmp=moduback |
||
190 | !endif |
||
191 | !set 1_=!append line $tmp,1,module=$module&cmd=intro&special_parm=$special_parm&special_parm2=$special_parm2&special_parm3=$special_parm3&special_parm4=$special_parm4&$docbl to $1_ |
||
9281 | bpr | 192 | !endif |
7182 | bpr | 193 | !! next exo and prev exo in the menu for supervisor |
7188 | bpr | 194 | !if $wims_user=supervisor and $exoprev$exonext != $empty and $wims_sheet=$empty |
12515 | bpr | 195 | !set 1_=!append line itemsep,0\ |
10792 | bpr | 196 | prev,1,cmd=new&module=$module&exo=$exoprev&special_parm=$special_parm&special_parm2=$special_parm2&special_parm3=$special_parm3&special_parm4=$special_parm4 \ |
197 | to $1_ |
||
198 | !set 1_=!append line next,1,cmd=new&module=$module&exo=$exonext&special_parm=$special_parm&special_parm2=$special_parm2&special_parm3=$special_parm3&special_parm4=$special_parm4 \ |
||
199 | to $1_ |
||
7182 | bpr | 200 | !reset exoprev exonext |
201 | !endif |
||
202 | |||
7699 | bpr | 203 | !if $special_parm4=$empty |
12515 | bpr | 204 | !if $cmd!=intro and $cmd!=help and $module!=home and \ |
205 | ../adm/ notin ../$module and \ |
||
206 | (../devel/ notin ../$module or $wims_devel_modules iswordof open) \ |
||
207 | and oef isin $module_category and $wims_classification_open=yes and ../devel/ notin ../$module |
||
208 | !set 1_=!append line itemsep,0,\ |
||
209 | Indexation,4,module=adm/tool/classification&refdir=$module&iniparm=$wims_homeref_parm,test to $1_ |
||
210 | !endif |
||
7699 | bpr | 211 | !endif |
8484 | bpr | 212 | !if $module_score!=$empty and $wims_class_exolog>0 and E notin $wims_sheet |
213 | !set 1_=!append line exolog,1,module=adm/class/exolog&cmd=new&job=log&logsheet=$wims_sheet&logexo=$wims_exo to $1_ |
||
214 | !endif |
||
7699 | bpr | 215 | |
7182 | bpr | 216 | |
8597 | obado | 217 | !! When in lightpopup mode, only links in whitelist are available |
218 | |||
219 | !if yes isin $wims_lightpopup |
||
12515 | bpr | 220 | !set whitelist = nextseries,previousseries |
221 | !set nb_elem=!linecnt $1_ |
||
222 | !for a=1 to $nb_elem |
||
223 | !set element = !line $a of $1_ |
||
224 | !set id = !item 1 of $element |
||
225 | !if $id isitemof $whitelist |
||
226 | !set wims_rm_0 = !append line $element to $wims_rm_0 |
||
227 | !endif |
||
228 | !next |
||
8597 | obado | 229 | !else |
12515 | bpr | 230 | !set wims_rm_0=$1_ |
8597 | obado | 231 | !endif |
232 | |||
1407 | bpr | 233 | !set wims_rm_3=!append line $wims_menu_tabs to $wims_rm_3 |
16 | reyssat | 234 | :rm2 |
235 | !if $wims_rm_2!=$empty |
||
12515 | bpr | 236 | !goto rmend |
16 | reyssat | 237 | !endif |
238 | !reset 2_ |
||
4346 | bpr | 239 | |
240 | !!********* Link #8 : "Author(s)" |
||
241 | |||
16 | reyssat | 242 | !if $module_author!=$empty and @ isin $module_address |
12515 | bpr | 243 | !read namewriting.phtml $module_author |
244 | !set wims_homeref_author_num=$script_cnt |
||
245 | !set module_address=!replace internal ; by , in $module_address |
||
246 | !if $wims_homeref_author_num>1 |
||
247 | !set 3_=$wims_name_authors: |
||
248 | !else |
||
249 | !set 3_=$wims_name_author: |
||
250 | !endif |
||
251 | !set 4_= |
||
252 | !for ad=1 to $wims_homeref_author_num |
||
253 | !if $(module_address[$ad])!= and @ isin $(module_address[$ad]) |
||
254 | !set 4__=!mailurl $(module_address[$ad]) $(script_out[$ad])\ |
||
4346 | bpr | 255 | WIMS $module_title [$module_language] |
12515 | bpr | 256 | !else |
257 | !set 4__=$(script_out[$ad]) |
||
7182 | bpr | 258 | !endif |
12515 | bpr | 259 | !set 4_=!append item $4__ to $4_ |
7182 | bpr | 260 | !next |
4346 | bpr | 261 | !set 2_=!append line author,0,$3_ $4_ to $2_ |
16 | reyssat | 262 | !endif |
4346 | bpr | 263 | |
264 | !!********* Link #9 : "Translator(s)" |
||
2233 | bpr | 265 | !set mod_transl=$(module_translator_$lang) |
266 | !if $module_transl!=$empty |
||
12515 | bpr | 267 | !set module_translator=$mod_transl |
268 | !set module_translator_address=$(module_translator_address_$lang) |
||
2233 | bpr | 269 | !endif |
270 | |||
16 | reyssat | 271 | !if $module_translator!=$empty and $module_translator_address!=$empty |
12515 | bpr | 272 | !read namewriting.phtml $module_translator |
273 | !set module_translator=$(script_out[1]) |
||
274 | !set wims_homeref_translator_num=$script_cnt |
||
275 | !set module_translator_address=!replace internal ; by , in $module_translator_address |
||
276 | !for ad=1 to $wims_homeref_translator_num |
||
277 | !set 3_=!mailurl $(module_translator_address[$ad]) $(module_translator[$ad])\ |
||
16 | reyssat | 278 | WIMS $module_title [$module_language] |
12515 | bpr | 279 | !set 2_=!append line trans,0,$wims_name_translatedby $3_ to $2_ |
280 | !next |
||
16 | reyssat | 281 | !endif |
2963 | bpr | 282 | !if $wims_theme_version>=1 |
12515 | bpr | 283 | !reset 2_ |
2963 | bpr | 284 | !endif |
16 | reyssat | 285 | !set 2_=!append line syou,0,$wims_name_syou to $2_ |
286 | !set 2_=!append line class,0,$wims_classname ($wims_institutionname) to $2_ |
||
11268 | obado | 287 | |
288 | !read date.phtml $wims_now,noprint |
||
289 | !set 2_=!append line time,0,$wims_name_server_time: $slib_out to $2_ |
||
16 | reyssat | 290 | !set wims_rm_2=$2_ |
4528 | bpr | 291 | !set wims_rm_5=$5_ |
16 | reyssat | 292 | |
293 | :rmend |
||
294 | !set wims_homeref_n1=!linecnt $wims_rm_1 |
||
295 | !set wims_homeref_n2=!linecnt $wims_rm_2 |
||
1202 | bpr | 296 | !set wims_homeref_n0=!linecnt $wims_rm_0 |
1407 | bpr | 297 | !set wims_homeref_n3=!linecnt $wims_rm_3 |
3044 | bpr | 298 | !!</div><!--div dans homeref_supervisor--> |
4528 | bpr | 299 | !set wims_homeref_n5=!linecnt $wims_rm_5 |
4635 | bpr | 300 | !set wims_homeref_local_n0=!linecnt $wims_local_menu_items |
16 | reyssat | 301 | !read themes.phtml tail |
302 | !robottrap |