Subversion Repositories wimsdev

Rev

Rev 17285 | Rev 17412 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
12848 obado 1
<!-- BEGIN of html/headmenu_user -->
12846 bpr 2
!read name.phtml.$lang
3
!read themes/_lang/name.phtml.$lang
4
!read themes/$wims_theme/lang/name.phtml.$lang
5
!default wims_name_bgcolor=$wims_ref_bgcolor
6
!if $wims_hm$wims_home_items$wims_link_close!=$empty
15069 bpr 7
  !goto defend
12846 bpr 8
!endif
9
 
14778 guerimand 10
!if $module=adm/class/tchat and $job=viewpage
11
  !reset wims_hm,wims_home_items,wims_link_close
12
  !let wims_hm=back,3,window.close();$wims_href_opener
13
  !goto defend
14
!endif
15
 
12846 bpr 16
!reset 1_ home_
17
!if _ isin $wims_session
18
  !if _exam isin $wims_session
19
    !set wims_pses=!translate _ to , in $wims_session
20
    !set wims_pses=!item 1 of $wims_pses
21
    !set wims_pser=!randint 1,99999
22
    !set wims_href_opener=window.opener.location='$wims_ref_name?session=$wims_pses.1&+cmd=reply&+job=student&+randomizer=$wims_pser';
17410 guerimand 23
    !! ---------- progressbar in case of course mode
24
    !if $(wims_exrandomlist[3;])=1
25
      !readproc examprogressbar.proc
26
      !set 1_=!append line progress,0,&nbsp;$wims_progressbar&nbsp; to $1_
27
    !endif
12846 bpr 28
  !endif
14778 guerimand 29
  !if $module=adm/class/tchat
30
    !if $job!=close
15109 guerimand 31
      !set 1_=!append line tchatclose,1,cmd=reply&module=adm/class/tchat&job=close to $1_
14778 guerimand 32
    !endif
33
  !else
34
    !set 1_=!append line back,3,window.close();$wims_href_opener to $1_
35
  !endif
12846 bpr 36
!else
37
  !if $module!=home or ($module=home and $seq!=$empty)
38
    !set home_=!append line class_home,1,session=$wims_session.1 to $home_
39
  !else
40
    !set home_=!append line class_home,8, to $home_
41
  !endif
42
!endif
43
 
44
!!! deconnexion link
45
 
46
!if _ notin $wims_session
47
  !if $class_cas_auth!=$empty
48
    !if $wims_user=supervisor
49
      !set wims_link_close=!append line visitor,1,cmd=close&module=adm/class/classes&type=supervisor&class_auth=$class_cas_auth to $wims_link_close
50
    !else
51
      !if $wims_class!=$empty
52
        !set wims_link_close=!append line visitor,1,cmd=close&module=adm/class/classes&type=participant&class_auth=$class_cas_auth to $wims_link_close
53
      !else
54
        !set wims_link_close=!append line visitor,1,cmd=close&class_auth=$wims_cas_auth to $wims_link_close
55
      !endif
56
    !endif
57
  !else
58
    !if $wims_user=supervisor
59
      !set wims_link_close=!append line visitor,1,cmd=close&module=adm/class/classes&type=supervisor to $wims_link_close
60
    !else
61
     !!!set registered=!record 0 of wimshome/$wims_sesdir/examreg.1
62
     !if $registered!=$empty
63
!! during an exam.
64
        !set wims_link_close=!append line endexam,1,module=adm/class/exam&cmd=reply&job=scorereg to $wims_link_close
65
      !else
66
        !if $wims_user=anonymous
67
          !set wims_link_close=!append line visitor,1,cmd=close&module=adm/class/classes&type=example to $wims_link_close
68
        !else
69
          !set wims_link_close=!append line visitor,1,cmd=close&module=adm/class/classes&type=participant to $wims_link_close
70
        !endif
71
      !endif
72
    !endif
73
  !endif
74
!endif
75
 
76
!if _check isin $wims_session
16257 guerimand 77
  !! it is the case for examlog or exolog or freeworklog
12846 bpr 78
  !set ckstep=$special_parm
79
  !distribute item $wims_check into ckmodule,ckuser,cksession,ckexo,cksteps,score
16257 guerimand 80
  !set qstr=module=$ckmodule&+cmd=new&+job=examcheck&+checkuser=$ckuser&+checksession=$cksession&+checkexo=$ckexo
12846 bpr 81
  !set 2_=$wims_page_name : &nbsp;
82
  !ifval $ckstep>1
83
    !set 2_=$2_<a href="$wims_ref_name?session=$session&+$qstr&+checkstep=1">1</a>&nbsp;
84
    !if $ckstep=2
85
      !set 2_=$(2_)2&nbsp;
86
    !else
87
      !if $ckstep=3
88
        !set 2_=$(2_)<a href="$wims_ref_name?session=$session&+$qstr&+checkstep=2">2</a>&nbsp;3&nbsp;
89
      !else
90
        !set 2_=$(2_)&nbsp;...&nbsp;<a href="$wims_ref_name?session=$session&+$qstr&+checkstep=$[$ckstep-1]">$[$ckstep-1]</a>&nbsp;$ckstep&nbsp;
91
      !endif
92
    !endif
93
  !else
94
    !set 2_=$2_ 1 &nbsp;
95
  !endif
96
  !if $ckstep<$cksteps
97
    !ifval $ckstep<$cksteps-2
98
      !set 2_=$2_<a href="$wims_ref_name?session=$session&+$qstr&+checkstep=$[$ckstep+1]">$[$ckstep+1]</a>&nbsp;...&nbsp;<a href="$wims_ref_name?session=$session&+$qstr&+checkstep=$cksteps">$cksteps</a>
99
    !else
100
      !ifval $ckstep=$cksteps-2
101
        !set 2_=$2_<a href="$wims_ref_name?session=$session&+$qstr&+checkstep=$[$ckstep+1]">$[$ckstep+1]</a>&nbsp;<a href="$wims_ref_name?session=$session&+$qstr&+checkstep=$cksteps">$cksteps</a>
102
      !else
103
        !ifval $ckstep=$cksteps-1
104
          !set 2_=$2_<a href="$wims_ref_name?session=$session&+$qstr&+checkstep=$[$ckstep+1]">$[$ckstep+1]</a>
105
        !endif
106
      !endif
107
    !endif
108
  !endif
109
  !set 1_=!append line nav,0,$2_ to $1_
110
  !set 3_=!translate internal - to , in $ckexo
111
  !set 3_=!item -1 of $3_
15608 bpr 112
  !if $wims_user=supervisor
16355 guerimand 113
    !if $ckexo=file and $wims_checktitle!=$empty
114
      !set tmp=$wims_checktitle
115
    !else
116
      !set tmp=$ckuser: $3_=$module,$cksteps steps, $score/10
117
    !endif
15608 bpr 118
  !else
119
    !set tmp=
120
  !endif
16355 guerimand 121
  !set 2_=<small>$tmp.</small>
15608 bpr 122
  !reset tmp
12846 bpr 123
  !set wims_hm=!append line score,0,$2_ to $1_
124
  !goto defend
125
!endif
126
!!!if adm/forum notin $module and _ notin $wims_session \
14338 bpr 127
!!  and $wims_sheet=$empty
12846 bpr 128
 !!!set 1_=!append line forum,1,module=adm/forum/mboard to $1_
129
!!!endif
130
!!if $cmd=intro
131
!! !set 1_=!append line work,1,module=$module&cmd=new to $1_
132
!!endif
133
!if _exam isin $wims_session
134
  !set 1_=!append line tools,4,module=home,tool to $1_
135
!endif
136
!!!if _ notin $wims_session and adm/ notin $module and $cmd notwordof help ref
137
 !!!set 1_=!append line reference,4,module=$module&cmd=ref&special_parm=$cmd,ref to $1_
138
!!!endif
139
:ariane_sheet
14753 bpr 140
!if ($wims_sequence>0 or $m_wims_sequence>0) \
141
  and (adm/sheet isin $module or $module_category!=adm or $module=adm/doc)
12846 bpr 142
  !set tmp_=$m_wims_sequence
143
  !default tmp_=$wims_sequence
144
  !if $wims_user=supervisor
145
    !set wims_ariane=!append line sequence,1,module=adm/class/sequence&seq=$tmp_\
146
to $wims_ariane
147
  !else
148
    !set wims_ariane=!append line sequence,1,module=home&seq=$tmp_#sh$wims_sheet to $wims_ariane
149
  !endif
150
  !reset tmp_
151
  !set wims_ariane_self=no
152
!else
153
  !if adm/doc isin $module and $wims_user!=supervisor
154
    !set wims_ariane=!append line doc,8 to $wims_ariane
155
    !set wims_ariane_self=no
156
  !endif
14753 bpr 157
  !if adm/class/freework isin $module
14764 bpr 158
    !set wims_ariane=!append line Freework $freework,1,module=adm/class/freework&freework=$freework to $wims_ariane
14753 bpr 159
    !set wims_ariane_self=no
160
  !endif
12846 bpr 161
!endif
162
!if $wims_sheet>0 or P isin $wims_sheet
17071 guerimand 163
   !if swork=$(wims_listexo[1])
164
     !set wims_ariane=!append line swork,1,module=adm/class/swork& to $wims_ariane
165
   !else
166
     !set wims_ariane=!append line sheet,1,module=adm/sheet&sh=$wims_sheet#ex$wims_exo to $wims_ariane
167
   !endif
12846 bpr 168
   !set wims_ariane_self=no
169
!else
170
   !if adm/sheet isin $module
171
     !set wims_ariane=!append line sheet,8 to $wims_ariane
172
     !set wims_ariane_self=no
173
   !endif
174
!endif
175
 
176
!if $job=print or $printing=yes
177
  !!goto defend
178
!endif
179
!if $cmd=help or $cmd=hint
180
  !set 1_=!append line resume,1,cmd=resume to $1_
181
!endif
182
!if $module_has_intro=yes and $cmd notwordof intro help and \
16657 guerimand 183
    $wims_sheet=$empty and $wims_fwnumber=$empty and exam notin $wims_session \
184
    and mfeed notin $wims_session and $wims_freework=$empty \
185
    and ($wims_user=$empty or $wims_user=supervisor)
12846 bpr 186
  !if $wims_theme!=default
187
    !set wims_ariane=!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 $wims_ariane
188
    !set wims_ariane_self=no
189
  !else
190
    !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_
191
  !endif
192
!endif
16656 guerimand 193
!if $wims_fwnumber!=$empty
194
    !set wims_ariane=!append line freework,1,module=adm/class/freework&cmd=new&freework=$(wims_fwnumber) to $wims_ariane
16087 guerimand 195
    !set wims_ariane_self=no
196
!endif
15069 bpr 197
!! ------------ add link for sendbug (TEST TO BE IMPROVED ?)
14753 bpr 198
!! TODO : change name of the window to open should be deleted when
14513 guerimand 199
!if $wims_class!=$empty and $wims_user=supervisor and adm/ notin $module and classes/ notin $module and devel/ notin $module and $module!=home and $cmd!=intro
14502 guerimand 200
  !let number_=!randint 1,1000
201
  !set 1_=!append line sendbug,4,module=adm/sendbug&cmd=new,sendbug$(number_) to $1_
14500 guerimand 202
!endif
12846 bpr 203
!if $module_has_help=yes and $cmd notwordof intro help and _exam notin $wims_session
204
  !if $module_help=$empty or $module_help=popup
205
    !set 1_=!append line help,4,module=$module&cmd=help&special_parm=$wims_help_parm,mhelp to $1_
206
  !else
207
    !set 1_=!append line help,1,module=$module&cmd=help&special_parm=$wims_help_parm to $1_
208
  !endif
209
!endif
210
 
211
!if $wims_theme_version=0
212
  !if _ notin $wims_session
213
    !set 1_=!append line whelp,4,module=help/main&$wims_helper,help to $1_
214
  !endif
215
!endif
216
 
217
!!********* Link: "About"
218
!if $module_has_about=yes and $cmd notwordof help and $module!=home \
15605 bpr 219
    and _exam notin $wims_session and _mfeed notin $wims_session \
220
    and ($wims_user iswordof supervisor developper or $wims_user=$empty)
12846 bpr 221
  !set 1_=!append line about,4,module=$module&cmd=help&special_parm=about,mhelp,,$wims_name_module_infos ($module) to $1_
222
!endif
223
 
224
!set wims_hm=$1_
225
!set wims_home_items=$home_
226
:defend
227
!set wims_hm_cnt=!linecnt $wims_hm
228
!set wims_home_items_cnt=!linecnt $wims_home_items
229
!set wims_link_close_cnt=!linecnt $wims_link_close
230
!set wims_ariane_cnt=!linecnt $wims_ariane
231
!read themes.phtml header
14778 guerimand 232
<!--BEGINSUPVIEW-->
12846 bpr 233
<div class="wimsbody">
17285 guerimand 234
!read themes/_widgets/adminalert.phtml
12848 obado 235
<!-- END of html/headmenu_user -->
16087 guerimand 236
!read themes/_widgets/freeworkmanage.phtml head