Subversion Repositories wimsdev

Rev

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