Rev 17236 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
18354 | lemaire | 1 | !if _check isin $session |
2 | !read themes.phtml tail |
||
3 | !exit |
||
4 | !endif |
||
5 | |||
6 | !read name.phtml.$module_language |
||
7 | !read themes/_lang/name.phtml.$lang |
||
8 | !read themes/$wims_theme/lang/name.phtml.$lang |
||
9 | !default wims_homeref_bgcolor=$wims_ref_bgcolor |
||
10 | !read themes/$wims_theme/local.phtml |
||
11 | |||
12 | !if exam isin $wims_session |
||
13 | !read examclock.proc |
||
14 | !goto rmend |
||
15 | !endif |
||
16 | |||
17 | !if $wims_rm_1=no |
||
18 | !reset wims_rm_1 |
||
19 | !goto local |
||
20 | !endif |
||
21 | !if $wims_rm_1!=$empty |
||
22 | !goto rm2 |
||
23 | !endif |
||
24 | !reset 1_ |
||
25 | |||
26 | !if _ isin $wims_subsession |
||
27 | !!set 1_=!append line back2,3,window.close() to $1_ |
||
28 | !else |
||
29 | !!set 1_=!append line class_home,1,session=$wims_session.1 to $1_ |
||
30 | !endif |
||
31 | |||
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 |
||
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) |
||
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 |
||
46 | !endif |
||
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 |
||
49 | !endif |
||
50 | !endif |
||
51 | |||
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 | |||
56 | !if $wims_sheet>0 or P isin $wims_sheet |
||
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 |
||
64 | !set 5_=!append line feedbackexo,7,$(feedexo[1])&seed=$wims_seed,mfeed to $5_ |
||
65 | !else |
||
66 | !set 5_=!append line feedbackplus,7,$(feedexo[1]),mfeed to $5_ |
||
67 | !endif |
||
68 | !endif |
||
69 | !next |
||
70 | !endif |
||
71 | !endif |
||
72 | !if $cmd=help or $cmd=hint |
||
73 | !!set 1_=!append line resume,1,cmd=resume to $1_ |
||
74 | !endif |
||
75 | |||
76 | !if $module_has_intro=yes and $cmd notwordof intro help and\ |
||
77 | $wims_sheet=$empty and exam notin $wims_session and mfeed notin $wims_session |
||
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_ |
||
79 | !endif |
||
80 | !if $module_has_help=yes and $cmd notwordof intro help |
||
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 |
||
86 | !endif |
||
87 | |||
88 | !!********* Link : "About" |
||
89 | !if $module_has_about=yes and $cmd notwordof help intro and ($wims_user=supervisor or $wims_user=$empty) |
||
90 | !!set 1_=!append line about,4,module=$module&cmd=help&special_parm=about,mhelp to $1_ |
||
91 | !endif |
||
92 | |||
93 | !if print isin $job,$job2 or $print!= |
||
94 | !set 1_=!append line print,3,window.print() to $1_ |
||
95 | !endif |
||
96 | !set wims_rm_1=$1_ |
||
97 | |||
98 | :local |
||
99 | !reset 1_ |
||
100 | !! add module links to general links with a separation |
||
101 | !if $wims_menu_items!=$empty |
||
102 | !set 1_=!append line itemsep,0,\ |
||
103 | $wims_menu_items to $1_ |
||
104 | !endif |
||
105 | !set wims_rm_0=$1_ |
||
106 | !set wims_rm_3=!append line $wims_menu_tabs to $wims_rm_3 |
||
107 | :rm2 |
||
108 | !if $wims_rm_2!=$empty |
||
109 | !goto rmend |
||
110 | !endif |
||
111 | |||
112 | !set 3_=!mailurl $wims_supervisormail <span>$wims_name_wsup</span>\ |
||
113 | $module_title |
||
114 | !set 2_=you,0,$wims_name_you\ |
||
115 | class,0,$wims_classname ($wims_institutionname)\ |
||
116 | wsup,0,$3_ |
||
117 | !reset 4_ |
||
118 | !if $wims_sheet>0 |
||
119 | !set wims_homeref_scorestat=!getscorestatus sheet=$wims_sheet |
||
120 | !set wims_homeref_maxexotry=!getscoremaxexotry sheet=$wims_sheet work=$wims_exo |
||
121 | !set wims_homeref_alltries=!getscorealltries sheet=$wims_sheet work=$wims_exo |
||
122 | !if $module_score=$empty and $cmd iswordof reply next resume hint |
||
123 | !set wims_homeref_alltries=$[max($wims_homeref_alltries-1,0)] |
||
124 | !else |
||
125 | !set wims_homeref_alltries=$[$wims_homeref_alltries] |
||
126 | !endif |
||
127 | !default wims_homeref_alltries=0 |
||
128 | !if $wims_exotrymax!=$empty |
||
129 | !set tmp_exotrymax=$wims_name_try $wims_homeref_alltries/$wims_exotrymax<br> |
||
130 | !endif |
||
131 | !if ($wims_homeref_scorestat=yes and $wims_exodep!=pending) \ |
||
132 | and ($wims_exotrymax<=1 or $wims_homeref_alltries<=$wims_exotrymax) |
||
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 |
||
137 | !set wims_name_score=$tmp_exotrymax |
||
138 | !if $wims_severity=$empty |
||
139 | !set tmp=!getexoindex module=$module param=$module_init_parm sheet=$wims_sheet |
||
140 | !set wims_severity=!words2items $(tmp[2]) |
||
141 | !endif |
||
142 | !if $(wims_severity[2])!=1 or $(wims_severity[2])=$empty or $wims_homeref_mean<=2 |
||
143 | !set wims_name_score=$wims_name_score$(wims_name_thsheet[7]): $[ceil(100*$[$wims_homeref_mean])/100]/10 |
||
144 | !endif |
||
145 | !if $(wims_severity[3])=2 |
||
146 | !set wims_homeref_level=!getscorelevel sheet=$wims_sheet work=$wims_exo |
||
147 | !set wims_name_score=$wims_name_score<br>$(wims_name_thsheet[13]): $wims_homeref_level/10 |
||
148 | !! I1 |
||
149 | !else |
||
150 | !if $(wims_severity[3])=1 |
||
151 | !set wims_homeref_best=!getscorebest sheet=$wims_sheet work=$wims_exo |
||
152 | !set wims_name_score=$wims_name_score<br>$(wims_name_thsheet[10]): $[ceil(100*$wims_homeref_best/$wims_homeref_req)] % |
||
153 | !!I2 |
||
154 | !else |
||
155 | !set wims_homeref_got=!getscore sheet=$wims_sheet work=$wims_exo |
||
156 | !set wims_name_score=$wims_name_score<br>$(wims_name_thsheet[5]): $[ceil(100*$wims_homeref_got/$wims_homeref_req)]% |
||
157 | !!I0 |
||
158 | !endif |
||
159 | !endif |
||
160 | !set 4_=!append line score,0,$wims_name_score to $4_ |
||
161 | !if $wims_authscoresuspend!=no |
||
162 | !!set wims_rm_0=!append line scoreclose2,1,module=adm/sheet&sh=$wims_sheet&exo=$wims_exo&job=suspend to $wims_rm_0 |
||
163 | !endif |
||
164 | !else |
||
165 | !set 4_=!append line score,0,$wims_name_scoresuspend to $4_ |
||
166 | !if $wims_authscoresuspend!=no |
||
167 | !!set wims_rm_0=!append line scorereopen,1,module=adm/sheet&sh=$wims_sheet&exo=$wims_exo&job=reopen to $wims_rm_0 |
||
168 | !endif |
||
169 | !endif |
||
170 | !else |
||
171 | !if $wims_homeref_maxexotry!=yes |
||
172 | !set 4_=!append line score,0,$wims_name_scoreclose to $4_ |
||
173 | !else |
||
174 | !set 4_=!append line score,0,$wims_name_maxexotry1 to $4_ |
||
175 | !endif |
||
176 | !endif |
||
177 | !if $module_score!=$empty and $wims_class_exolog>0 and E notin $wims_sheet |
||
178 | !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 |
||
179 | !endif |
||
180 | !endif |
||
181 | |||
182 | !if $wims_class!=$empty and $wims_user!=supervisor and tchat notin $wims_session \ |
||
183 | and $class_type<2 and class/tchat isitemof $wims_allowed_optional_module\ |
||
184 | and $module!=adm/light |
||
185 | !set wims_rm_0=!append line itemsep,0,$wims_name_classactivity to $wims_rm_0 |
||
186 | !read themes/_procs/usertchat.proc |
||
187 | !endif |
||
188 | |||
189 | !set wims_rm_2=$2_ |
||
190 | !set wims_rm_4=$4_ |
||
191 | !set wims_rm_5=$5_ |
||
192 | |||
193 | :rmend |
||
194 | !set wims_homeref_n1=!linecnt $wims_rm_1 |
||
195 | !set wims_homeref_n2=!linecnt $wims_rm_2 |
||
196 | !set wims_homeref_n0=!linecnt $wims_rm_0 |
||
197 | !!nothing inside |
||
198 | !set wims_homeref_n3=!linecnt $wims_rm_3 |
||
199 | !! about activation and score |
||
200 | !set wims_homeref_n4=!linecnt $wims_rm_4 |
||
201 | !! about feedback |
||
202 | !set wims_homeref_n5=!linecnt $wims_rm_5 |
||
203 | !set wims_homeref_local_n0=!linecnt $wims_local_menu_items |
||
204 | !!</div><!--div dans homeref_user--> |
||
205 | !read themes/_widgets/freeworkmanage.phtml tail |
||
206 | !read themes.phtml tail |
||
207 | !robottrap |