Subversion Repositories wimsdev

Rev

Rev 16022 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
973 obado 1
!!************** homeref.phtml  ****************
10792 bpr 2
!! This File creates 2 sets of links, to put in the left menu or tail menu of Wims.
973 obado 3
!! 1st set contains up to 6 links
4
!! 2nd set contains informations about author(s), and mail links to them.
5648 obado 5
!! **********************************************
6
<!-- begin of html/homeref.phtml -->
973 obado 7
 
5648 obado 8
!if yes isin $wims_lightpopup
12824 bpr 9
  !if $wims_lightpopup_option=$empty
10
    !set 1_=!append line itemsep,0, $wims_name_devwims to $1_
11
    !set 1_=!append line itemsep,0, $wims_name_Author: $module_author to $1_
12
    !set wims_rm_2=$1_
13
  !else
14
    !if about isitemof $wims_lightpopup_option
15
      !set 1_=!append line about,4,module=$module&cmd=help&special_parm=about,mhelp to $1_
16
    !endif
17
    !set wims_rm_1=$1_
2976 bpr 18
  !endif
15986 obado 19
  !goto rmend
2727 guerimand 20
!endif
973 obado 21
 
16 reyssat 22
!if robot isin $session or _check isin $session
15986 obado 23
  !if robot isin $session and wims.univ-cotedazur.fr notin $httpd_SERVER_NAME\
13562 obado 24
      and $cmd iswordof new intro
12824 bpr 25
    !set wims_c1=!char 1 of $module
26
    !if $wims_c1 isin ABCDEFGHIJKLMNOPQRSTUVWXYZ or ../tool isin ../$module
27
      !set wims_md=!translate . to , in $module
28
      !set wims_md=!item -1 of $wims_md
29
      !set wims_mdcnt=!charcnt $wims_md
30
      !if $wims_mdcnt=2
31
        !set wims_ff=!translate / to ~ in $module
17170 bpr 32
        <small><a href="https://wims.univ-cotedazur.fr/wims/$(wims_md)_$wims_ff.html">The most recent version</a></small><br>
12824 bpr 33
      !endif
34
    !endif
16 reyssat 35
  !endif
12824 bpr 36
  !changeto robotref.phtml
16 reyssat 37
!endif
38
 
39
!if $wims_mode=popup
12824 bpr 40
  <div class="wimstail">
17170 bpr 41
    <hr>
13562 obado 42
    <small>
43
     <a target="wims" href="http://$httpd_HTTP_HOST$httpd_SCRIPT_NAME">WIMS @ $httpd_HTTP_HOST</a>
44
    </small>
12824 bpr 45
  </div>
46
  !exit
16 reyssat 47
!endif
48
 
49
!if _test isin $session and $wims_hacked_variables!=$empty
12824 bpr 50
  <p><span class="wims_warning">WIMS WARNING</span>. The following variables of your module could be hacked
51
  by students using manually modified http addresses! You might want to put more
52
  strict permissions to them in var.def, in order to build a secure exercise module.
53
  </p>
54
  <pre>$wims_hacked_variables</pre>
16 reyssat 55
!endif
56
 
57
!read name.phtml.$module_language
11469 bpr 58
!read themes/_lang/name.phtml.$lang
9309 bpr 59
!read themes/$wims_theme/lang/name.phtml.$lang
16 reyssat 60
!default wims_homeref_bgcolor=$wims_ref_bgcolor
973 obado 61
 
1193 bpr 62
!if $wims_rm_1=no
12824 bpr 63
  !reset wims_rm_1
64
  !goto local
1193 bpr 65
!endif
16 reyssat 66
!if $wims_rm_1!=$empty
12824 bpr 67
  !goto rm2
16 reyssat 68
!endif
69
!reset 1_
973 obado 70
 
71
!!********* Link #1 : "Close Window" or "Home" (Not Shown if Embedded)
16 reyssat 72
!if _ isin $wims_subsession
12824 bpr 73
  !set 1_=!append line back,3,window.close() to $1_
16 reyssat 74
!else
12824 bpr 75
  !if $window != embeded
76
    !!set 1_=!append line home,1,session=$wims_session.1 to $1_
77
  !endif
16 reyssat 78
!endif
973 obado 79
 
80
!!********* Link #2 : "Sheet"
16 reyssat 81
!if $wims_sheet>0 or P isin $wims_sheet
12824 bpr 82
  !if $wims_sequence>0
83
    !set tmp_=sheet,1,module=adm/sheet&sh=$wims_sheet&seq=$wims_sequence
84
  !else
85
    !set tmp_=sheet,1,module=adm/sheet&sh=$wims_sheet&
86
  !endif
87
  !set 1_=!append line $tmp_ to $1_
88
  !let wims_menu_items=!append line $tmp_ to $wims_menu_items
15767 guerimand 89
  !let p=!positionof item $wims_exo in $wims_listexo
16022 bpr 90
  !if $p!= $empty and $module_score!=$empty
91
    !if $wims_exo!=$(wims_listexo[1])
92
      !let wims_menu_items=!append line previousseries,1,module=home&directworksheet=$wims_sheet.$(wims_listexo[$p-1]) to $wims_menu_items
93
    !endif
94
    !if $wims_exo!=$(wims_listexo[-1])
95
        !let wims_menu_items=!append line nextseries,1,module=home&directworksheet=$wims_sheet.$(wims_listexo[$p+1]) to $wims_menu_items
96
    !endif
12824 bpr 97
  !endif
16 reyssat 98
!endif
16022 bpr 99
!! module
10792 bpr 100
!if ($wims_user=$empty or $wims_developer!=$empty or $wims_user=supervisor)\
12824 bpr 101
    and $exoprev$exonext != $empty and $wims_sheet=$empty
102
  !set wims_menu_items=!append line itemsep,0\
12363 bpr 103
prev,1,cmd=new&module=$module&exo=$exoprev&wims_seedcnt=0&special_parm=$special_parm&special_parm2=$special_parm2&special_parm3=$special_parm3&special_parm4=$special_parm4 \
10792 bpr 104
     to $wims_menu_items
12824 bpr 105
  !set wims_menu_items=!append line next,1,cmd=new&module=$module&exo=$exonext&wims_seedcnt=0&special_parm=$special_parm&special_parm2=$special_parm2&special_parm3=$special_parm3&special_parm4=$special_parm4 \
10792 bpr 106
to $wims_menu_items
107
  !reset exoprev exonext
108
!endif
109
 
973 obado 110
!!********* Link #3 : "Resume"
16 reyssat 111
!if $cmd=help or $cmd=hint
12824 bpr 112
  !set 1_=!append line resume,1,cmd=resume to $1_
16 reyssat 113
!endif
973 obado 114
 
115
!!********* Link #4 : "Introduction" (Not Shown if Embedded)
116
!if $window != embeded and $module_has_intro=yes and $cmd notwordof intro help
12824 bpr 117
  !set 1_=!append line intro,1,module=$module&cmd=intro&special_parm=$special_parm&special_parm2=$special_parm2&special_parm3=$special_parm3 to $1_
16 reyssat 118
!endif
973 obado 119
 
2233 bpr 120
!if _ notin $wims_session and adm/ notin $module and home notin $module\
13562 obado 121
  and $cmd notwordof help ref
7351 bpr 122
 !!!set 1_=!append line reference,4,module=$module&cmd=ref&special_parm=$cmd,ref to $1_
2233 bpr 123
!endif
124
 
973 obado 125
!!********* Link #5 : "Help"
126
!if $module_help!=$empty and $module_has_help=yes and $cmd notwordof intro help
12824 bpr 127
  !if $module_help=popup
128
    !set 1_=!append line help,4,module=$module&cmd=help&special_parm=$wims_help_parm,mhelp to $1_
129
  !else
130
    !set 1_=!append line help,1,module=$module&cmd=help&special_parm=$wims_help_parm to $1_
131
  !endif
16 reyssat 132
!endif
973 obado 133
 
134
!!********* Link #6 : "About"
9762 bpr 135
!if $module_has_about=yes and $cmd notwordof help
9800 bpr 136
  !!set 1_=!append line about,4,module=$module&cmd=help&special_parm=about,mhelp to $1_
16 reyssat 137
!endif
973 obado 138
 
1222 bpr 139
!set wims_rm_1=$1_
1193 bpr 140
:local
1222 bpr 141
!reset 1_
10285 bpr 142
!if $wims_menu_items!=$empty
143
  !set 1_=!append line itemsep,0,\
9706 bpr 144
$wims_menu_items to $1_
10285 bpr 145
!endif
1222 bpr 146
!set wims_rm_0=$1_
6270 bpr 147
!!wims_menu_tabs not used - to delete
1407 bpr 148
!set wims_rm_3=!append line $wims_menu_tabs to $wims_rm_3
16 reyssat 149
:rm2
150
!if $wims_rm_2!=$empty
12824 bpr 151
  !goto rmend
16 reyssat 152
!endif
153
!reset 2_
973 obado 154
 
155
!!********* Link #8 : "Author(s)"
4318 bpr 156
 
8002 bpr 157
!if $module_author!=$empty and (@ isin $module_address or $module_address=$empty)
12824 bpr 158
  !read namewriting.phtml $module_author
159
  !set module_address=!replace internal ; by , in $module_address
160
  !set wims_homeref_author_num=$script_cnt
161
  !if $wims_homeref_author_num>1
162
    !set 3_=$wims_name_authors:
163
  !else
164
    !set 3_=$wims_name_author:
165
  !endif
166
  !set 4_=
167
  !for ad=1 to $wims_homeref_author_num
168
    !set adreplace=$(module_address[$ad])
169
    !if $adreplace=$empty
8002 bpr 170
      !set adreplace=$module_maintainer_address
12824 bpr 171
    !endif
172
    !if $adreplace!= and @ isin $adreplace
173
      !!!#### xiao treatment - should disappear when modules are republished
174
      !if xiao isin $adreplace
175
        !set adreplace=qualite@wimsedu.info
176
      !endif
177
      !!!####
178
      !set 4__=!mailurl $adreplace $(script_out[$ad])\
4346 bpr 179
WIMS $module_title [$module_language]
12824 bpr 180
    !else
181
      !set 4__=$(script_out[$ad])
182
    !endif
4346 bpr 183
    !set 4_=!append item $4__ to $4_
7808 bpr 184
  !next
4346 bpr 185
  !set 2_=!append line author,0,$3_ $4_ to $2_
16 reyssat 186
!endif
973 obado 187
 
188
!!********* Link #9 : "Translator(s)"
2233 bpr 189
!set mod_transl=$(module_translator_$lang)
190
!if $module_transl!=$empty
12824 bpr 191
  !set module_translator=$mod_transl
192
  !set module_translator_address=$(module_translator_address_$lang)
2233 bpr 193
!endif
194
 
16 reyssat 195
!if $module_translator!=$empty and $module_translator_address!=$empty
12824 bpr 196
  !read namewriting.phtml $module_translator
197
  !set module_translator_address=!replace internal ; by , in $module_translator_address
198
  !set module_translator=$(script_out[1])
199
  !set wims_homeref_translator_num=$script_cnt
200
  !for ad=1 to $wims_homeref_translator_num
201
    !set 3_=!mailurl $(module_translator_address[$ad]) $(module_translator[$ad])\
16 reyssat 202
WIMS $module_title [$module_language]
12824 bpr 203
    !set 2_=!append line trans,0,$wims_name_translatedby $3_ to $2_
204
  !next
16 reyssat 205
!endif
973 obado 206
 
207
!!********* Link #10 : "Version & Copyright"
16 reyssat 208
!if $module_version$module_copyright!=$empty
12824 bpr 209
  !set 2_=!append line version,0,$wims_name_Version $module_version, $module_copyright to $2_
16 reyssat 210
!endif
973 obado 211
 
212
!!********* Link #11 : "Modify"
16 reyssat 213
!if $wims_developer!=$empty and COPYING isin $module_copyright
12824 bpr 214
  !set V_=!char 1 of $module
215
  !set M_=!translate internal / to , in $module
15909 bpr 216
  !if $V_ isin ABCDEFGHIJKLMNOPQRTSUVWXYZ or $(M_[1]) iswordof local contrib tool \
217
    or ($(M_[1]) iswordof help and $(M_[3])!=$empty)
12824 bpr 218
    !set  wims_rm_0=!append line modify,1,module=adm/modtool&original=$module to $wims_rm_0
219
  !endif
16 reyssat 220
!endif
973 obado 221
 
222
!!********* Link #12 : "Server Time"
16 reyssat 223
!if $wims_ismanager>=2
12824 bpr 224
  !set 2_=!append line time,0,$wims_name_server_time: $wims_now to $2_
16 reyssat 225
!endif
226
 
227
!set wims_rm_2=$2_
973 obado 228
 
16 reyssat 229
:rmend
9706 bpr 230
!set wims_homeref_n0=!linecnt $wims_rm_0
16 reyssat 231
!set wims_homeref_n1=!linecnt $wims_rm_1
232
!set wims_homeref_n2=!linecnt $wims_rm_2
6270 bpr 233
!!!set wims_homeref_n3=!linecnt $wims_rm_3
16 reyssat 234
 
5648 obado 235
<!-- END of html/homeref.phtml -->
16 reyssat 236
!read themes.phtml tail
237
!robottrap