Subversion Repositories wimsdev

Rev

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

Rev Author Line No. Line
2761 bpr 1
!if _check isin $session
15728 reyssat 2
  !read themes.phtml tail
15070 bpr 3
  !exit
16 reyssat 4
!endif
5
 
6
!read name.phtml.$module_language
11469 bpr 7
!read themes/_lang/name.phtml.$lang
9309 bpr 8
!read themes/$wims_theme/lang/name.phtml.$lang
16 reyssat 9
!default wims_homeref_bgcolor=$wims_ref_bgcolor
4635 bpr 10
!read themes/$wims_theme/local.phtml
2761 bpr 11
 
16 reyssat 12
!if exam isin $wims_session
11296 bpr 13
  !read examclock.proc
11268 obado 14
  !goto rmend
16 reyssat 15
!endif
16
 
1193 bpr 17
!if $wims_rm_1=no
12365 bpr 18
  !reset wims_rm_1
19
  !goto local
1193 bpr 20
!endif
16 reyssat 21
!if $wims_rm_1!=$empty
12365 bpr 22
  !goto rm2
16 reyssat 23
!endif
24
!reset 1_
2865 guerimand 25
 
16 reyssat 26
!if _ isin $wims_subsession
12365 bpr 27
  !!set 1_=!append line back2,3,window.close() to $1_
16 reyssat 28
!else
12365 bpr 29
  !!set 1_=!append line class_home,1,session=$wims_session.1 to $1_
16 reyssat 30
!endif
10057 bpr 31
 
10055 bpr 32
!!!if $wims_sheet>0 or P isin $wims_sheet or $wims_sequence>0
33
!! !if $wims_sequence>0 and $wims_sheet=$empty
34
!!  !set tmp_=sequence,1,module=home&seq=$wims_sequence
35
!! !else
36
!!  !!set tmp_=sheet,1,module=adm/sheet&sh=$wims_sheet&
37
!! !endif
38
!!   !let wims_menu_items=!append line $tmp_ to $wims_menu_items
39
!!!endif
11685 bpr 40
!!fieldtot is the number of answer fields in a oef exercise,
41
!! for module it is not defined the condition is just that the exercise is finished.
42
!if ($wims_sheet>0 or P isin $wims_sheet) and (($cmd=reply and $module_score!=$empty) or $fieldtot=0)
15767 guerimand 43
  !let p=!positionof item $wims_exo in $wims_listexo
44
  !if $wims_exo!=$(wims_listexo[1])
45
    !let wims_menu_items=!append line previousseries,1,module=home&directworksheet=$wims_sheet.$(wims_listexo[$p-1]) to $wims_menu_items
12365 bpr 46
  !endif
15767 guerimand 47
  !if $wims_exo!=$(wims_listexo[-1])
48
    !let wims_menu_items=!append line nextseries,1,module=home&directworksheet=$wims_sheet.$(wims_listexo[$p+1]) to $wims_menu_items
12365 bpr 49
  !endif
16 reyssat 50
!endif
2865 guerimand 51
 
10057 bpr 52
!if $wims_sheet!=$empty or _exam isin $wims_session
53
  !set wims_menu_items=!append line tools,4,module=home,tool to $wims_menu_items
54
!endif
55
 
4528 bpr 56
!if $wims_sheet>0 or P isin $wims_sheet
14646 bpr 57
  !if $module_score!=$empty and $(wims_exofeedback[$wims_exo;])!=$empty
58
    !set feedexotot=!declosing $(wims_exofeedback[$wims_exo;])
59
    !set feedexocnt=!itemcnt $(feedexotot[;1])
60
    !for t=1 to $feedexocnt
61
      !set feedexo=$(feedexotot[$t;])
62
      !if $module_score < $(feedexo[2]) and $module_score >= $(feedexo[3])
63
        !if $module_score < 10
15870 bpr 64
          !set 5_=!append line feedbackexo,7,$(feedexo[1])&seed=$wims_seed,mfeed to $5_
14646 bpr 65
        !else
66
          !set 5_=!append line feedbackplus,7,$(feedexo[1]),mfeed to $5_
67
        !endif
12365 bpr 68
      !endif
14646 bpr 69
    !next
4528 bpr 70
  !endif
71
!endif
16 reyssat 72
!if $cmd=help or $cmd=hint
12365 bpr 73
  !!set 1_=!append line resume,1,cmd=resume to $1_
16 reyssat 74
!endif
4528 bpr 75
 
16 reyssat 76
!if $module_has_intro=yes and $cmd notwordof intro help and\
4528 bpr 77
        $wims_sheet=$empty and exam notin $wims_session and mfeed notin $wims_session
12365 bpr 78
  !!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 79
!endif
80
!if $module_has_help=yes and $cmd notwordof intro help
12365 bpr 81
  !if $module_help=$empty or $module_help=popup
82
   !!set 1_=!append line help,4,module=$module&cmd=help&special_parm=$wims_help_parm,mhelp to $1_
83
  !else
84
   !!set 1_=!append line help,1,module=$module&cmd=help&special_parm=$wims_help_parm to $1_
85
  !endif
16 reyssat 86
!endif
9800 bpr 87
 
88
!!********* Link : "About"
2949 bpr 89
!if $module_has_about=yes and $cmd notwordof help intro and ($wims_user=supervisor or $wims_user=$empty)
9800 bpr 90
   !!set 1_=!append line about,4,module=$module&cmd=help&special_parm=about,mhelp to $1_
16 reyssat 91
!endif
9800 bpr 92
 
1193 bpr 93
!if print isin $job,$job2 or $print!=
94
  !set 1_=!append line print,3,window.print() to $1_
95
!endif
1222 bpr 96
!set wims_rm_1=$1_
4801 guerimand 97
 
1193 bpr 98
:local
1222 bpr 99
!reset 1_
9706 bpr 100
!! add module links to general links with a separation
10285 bpr 101
!if $wims_menu_items!=$empty
102
  !set 1_=!append line itemsep,0,\
9706 bpr 103
$wims_menu_items to $1_
10285 bpr 104
!endif
1222 bpr 105
!set wims_rm_0=$1_
1407 bpr 106
!set wims_rm_3=!append line $wims_menu_tabs to $wims_rm_3
16 reyssat 107
:rm2
108
!if $wims_rm_2!=$empty
12365 bpr 109
  !goto rmend
16 reyssat 110
!endif
111
 
13175 obado 112
!set 3_=!mailurl $wims_supervisormail <span>$wims_name_wsup</span>\
16 reyssat 113
$module_title
114
!set 2_=you,0,$wims_name_you\
115
 class,0,$wims_classname ($wims_institutionname)\
116
 wsup,0,$3_
2963 bpr 117
!reset 4_
16 reyssat 118
!if $wims_sheet>0
12365 bpr 119
  !set wims_homeref_scorestat=!getscorestatus sheet=$wims_sheet
120
  !set wims_homeref_maxexotry=!getscoremaxexotry sheet=$wims_sheet work=$wims_exo
12381 bpr 121
  !set wims_homeref_alltries=!getscorealltries sheet=$wims_sheet work=$wims_exo
13007 bpr 122
  !if $module_score=$empty and $cmd iswordof reply next resume hint
12524 bpr 123
    !set wims_homeref_alltries=$[max($wims_homeref_alltries-1,0)]
124
  !else
125
    !set wims_homeref_alltries=$[$wims_homeref_alltries]
126
  !endif
12386 bpr 127
  !default wims_homeref_alltries=0
12527 bpr 128
  !if $wims_exotrymax!=$empty
17236 bpr 129
    !set tmp_exotrymax=$wims_name_try $wims_homeref_alltries/$wims_exotrymax<br>
12381 bpr 130
  !endif
12527 bpr 131
  !if ($wims_homeref_scorestat=yes and $wims_exodep!=pending) \
132
      and ($wims_exotrymax<=1 or $wims_homeref_alltries<=$wims_exotrymax)
12365 bpr 133
    !if $wims_scorereg!=suspend
134
      !set wims_homeref_req=!getscorerequire sheet=$wims_sheet work=$wims_exo
135
      !set wims_homeref_mean=!getscoremean sheet=$wims_sheet work=$wims_exo
136
      !set wims_homeref_last=!getscorelast sheet=$wims_sheet work=$wims_exo
12527 bpr 137
      !set wims_name_score=$tmp_exotrymax
12365 bpr 138
      !if $(wims_severity[2])!=1 or $(wims_severity[2])=$empty or $wims_homeref_mean<=2
12527 bpr 139
        !set wims_name_score=$wims_name_score$(wims_name_thsheet[7]): $[ceil(100*$[$wims_homeref_mean])/100]/10
12365 bpr 140
      !endif
141
      !if $(wims_severity[3])=2
142
        !set wims_homeref_level=!getscorelevel sheet=$wims_sheet work=$wims_exo
17236 bpr 143
        !set wims_name_score=$wims_name_score<br>$(wims_name_thsheet[13]): $wims_homeref_level/10
12365 bpr 144
        !! I1
145
      !else
146
        !if $(wims_severity[3])=1
147
          !set wims_homeref_best=!getscorebest sheet=$wims_sheet work=$wims_exo
17236 bpr 148
          !set wims_name_score=$wims_name_score<br>$(wims_name_thsheet[10]): $[ceil(100*$wims_homeref_best/$wims_homeref_req)] %
12365 bpr 149
          !!I2
150
        !else
151
          !set wims_homeref_got=!getscore sheet=$wims_sheet work=$wims_exo
17236 bpr 152
          !set wims_name_score=$wims_name_score<br>$(wims_name_thsheet[5]): $[ceil(100*$wims_homeref_got/$wims_homeref_req)]%
12365 bpr 153
          !!I0
154
        !endif
155
      !endif
156
      !set 4_=!append line score,0,$wims_name_score to $4_
157
      !if $wims_authscoresuspend!=no
158
        !!set wims_rm_0=!append line scoreclose2,1,module=adm/sheet&sh=$wims_sheet&exo=$wims_exo&job=suspend to $wims_rm_0
159
      !endif
160
    !else
12391 bpr 161
      !set 4_=!append line score,0,$wims_name_scoresuspend to $4_
12365 bpr 162
      !if $wims_authscoresuspend!=no
163
        !!set wims_rm_0=!append line scorereopen,1,module=adm/sheet&sh=$wims_sheet&exo=$wims_exo&job=reopen to $wims_rm_0
164
      !endif
165
    !endif
16 reyssat 166
  !else
12365 bpr 167
    !if $wims_homeref_maxexotry!=yes
12391 bpr 168
      !set 4_=!append line score,0,$wims_name_scoreclose to $4_
12365 bpr 169
    !else
170
      !set 4_=!append line score,0,$wims_name_maxexotry1 to $4_
171
    !endif
16 reyssat 172
  !endif
12365 bpr 173
  !if $module_score!=$empty and $wims_class_exolog>0 and E notin $wims_sheet
174
    !set wims_rm_0=!append line exolog,1,module=adm/class/exolog&cmd=new&job=log&logsheet=$wims_sheet&logexo=$wims_exo to $wims_rm_0
12213 bpr 175
  !endif
16 reyssat 176
!endif
4801 guerimand 177
 
15610 bpr 178
!if $wims_class!=$empty and $wims_user!=supervisor and tchat notin $wims_session \
179
    and $class_type<2 and class/tchat isitemof $wims_allowed_optional_module\
180
    and $module!=adm/light
15070 bpr 181
  !set wims_rm_0=!append line itemsep,0,$wims_name_classactivity to $wims_rm_0
182
  !read themes/_procs/usertchat.proc
15610 bpr 183
!endif
15070 bpr 184
 
16 reyssat 185
!set wims_rm_2=$2_
2963 bpr 186
!set wims_rm_4=$4_
4528 bpr 187
!set wims_rm_5=$5_
10057 bpr 188
 
16 reyssat 189
:rmend
190
!set wims_homeref_n1=!linecnt $wims_rm_1
191
!set wims_homeref_n2=!linecnt $wims_rm_2
1222 bpr 192
!set wims_homeref_n0=!linecnt $wims_rm_0
9706 bpr 193
!!nothing inside
1407 bpr 194
!set wims_homeref_n3=!linecnt $wims_rm_3
9706 bpr 195
!! about activation and score
2963 bpr 196
!set wims_homeref_n4=!linecnt $wims_rm_4
9706 bpr 197
!! about feedback
4528 bpr 198
!set wims_homeref_n5=!linecnt $wims_rm_5
4635 bpr 199
!set wims_homeref_local_n0=!linecnt $wims_local_menu_items
3044 bpr 200
!!</div><!--div dans homeref_user-->
16087 guerimand 201
!read themes/_widgets/freeworkmanage.phtml tail
16 reyssat 202
!read themes.phtml tail
203
!robottrap