Rev 11145 | Rev 14088 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 11145 | Rev 12467 | ||
---|---|---|---|
Line 8... | Line 8... | ||
8 | !!dl=!lower $dl |
8 | !!dl=!lower $dl |
9 | !if login notin $dl |
9 | !if login notin $dl |
10 | dl=login,$dl |
10 | dl=login,$dl |
11 | !endif |
11 | !endif |
12 | !for t in average,sheet,exam,manual |
12 | !for t in average,sheet,exam,manual |
13 | dl=!replace $t $ by $t in $dl |
13 | dl=!replace $t $ by $t in $dl |
14 | !next t |
14 | !next t |
15 | dl=!items2words $dl |
15 | dl=!items2words $dl |
16 | dl=!replace word names by name in $dl |
16 | dl=!replace word names by name in $dl |
17 | dl=!replace grade by manual in $dl |
17 | dl=!replace grade by manual in $dl |
18 | dl=!replace word allscores by allscore in $dl |
18 | dl=!replace word allscores by allscore in $dl |
Line 57... | Line 57... | ||
57 | !!!if examexos isin $dl |
57 | !!!if examexos isin $dl |
58 | !! tmp=!column 2 to -1 of $exe |
58 | !! tmp=!column 2 to -1 of $exe |
59 | !! tmp=!lines2words $tmp |
59 | !! tmp=!lines2words $tmp |
60 | !! dl=!replace word examexos by $tmp in $dl |
60 | !! dl=!replace word examexos by $tmp in $dl |
61 | !!!else |
61 | !!!else |
62 |
|
62 | !for i in $activexams |
63 |
|
63 | !if examexo$i iswordof $dl |
64 |
|
64 | tmp=!select $exe where column 1 = $i |
65 |
|
65 | dl=!replace word examexo$i by $(tmp[2..-1]) in $dl |
66 |
|
66 | dl=!replace word examexo$i by in $dl |
67 |
|
67 | !endif |
68 |
|
68 | !next i |
69 | !!!endif |
69 | !!!endif |
70 | dl=!words2items $dl |
70 | dl=!words2items $dl |
71 | dl=!listuniq $dl |
71 | dl=!listuniq $dl |
72 | 72 | ||
73 | good=!words2items $good,$regvarlist |
73 | good=!words2items $good,$regvarlist |
Line 97... | Line 97... | ||
97 | sep=$(sep_$csvformat) |
97 | sep=$(sep_$csvformat) |
98 | dl2=!replace , by ,user_ in user_$dl |
98 | dl2=!replace , by ,user_ in user_$dl |
99 | dl2=!translate , to $sep in $dl2 |
99 | dl2=!translate , to $sep in $dl2 |
100 | 100 | ||
101 | !if $dl_var!=$empty |
101 | !if $dl_var!=$empty |
102 |
|
102 | dl4=!replace , by ,user_ in user_$dl_v |
103 |
|
103 | dl4=$sep$dl4 |
104 |
|
104 | dl5=$sep$dl5 |
105 |
|
105 | dl=$dl$sep$dl_var |
106 | !endif |
106 | !endif |
107 | 107 | ||
108 | tit=!replace internal , by $quote,$quote in $quote$tit$quote |
108 | tit=!replace internal , by $quote,$quote in $quote$tit$quote |
109 | tit=!translate , to $sep in $dl |
109 | tit=!translate , to $sep in $dl |
110 | !! quote the values (case of word groups) |
110 | !! quote the values (case of word groups) |
Line 117... | Line 117... | ||
117 | dl2=!replace user_$n by $(quote)user_$n$quote in $dl2 |
117 | dl2=!replace user_$n by $(quote)user_$n$quote in $dl2 |
118 | !next n |
118 | !next n |
119 | !endif |
119 | !endif |
120 | dl4r=!items2words $dl4 |
120 | dl4r=!items2words $dl4 |
121 | !if $dl4!=$empty |
121 | !if $dl4!=$empty |
122 | dl4=!replace , by $(quote),$(quote) in $(quote)$dl4$(quote) |
122 | dl4=!replace , by $(quote),$(quote) in $(quote)$dl4$(quote) |
123 | dl4=!char 3 to -1 of $dl4 |
123 | dl4=!char 3 to -1 of $dl4 |
124 | dl5=!replace user_ by $$name_user_ in $dl4 |
124 | dl5=!replace user_ by $$name_user_ in $dl4 |
125 | dl4=!replace user_ by $$user_ in $dl4 |
125 | dl4=!replace user_ by $$user_ in $dl4 |
126 | !else |
126 | !else |
127 | dl5=$empty |
127 | dl5=$empty |
128 | !endif |
128 | !endif |
129 | dl3=!replace user_ by $$name_ in $dl2 |
129 | dl3=!replace user_ by $$name_ in $dl2 |
130 | dl2=!replace user_ by $$user_ in $dl2 |
130 | dl2=!replace user_ by $$user_ in $dl2 |
131 | 131 | ||
132 | scores=no |
132 | scores=no |
133 | !if average isin $dl or manual isin $dl or sheet isin $dl or exam isin $dl |
133 | !if average isin $dl or manual isin $dl or sheet isin $dl or exam isin $dl |
134 | scores=yes |
134 | scores=yes |
135 | !endif |
135 | !endif |
136 | 136 | ||
137 | !read csv/csvnames |
137 | !read csv/csvnames |
138 | !writefile $fname $tit\ |
138 | !writefile $fname $tit\ |
139 | $dl3$dl5\ |
139 | $dl3$dl5\ |
140 | 140 | ||
141 | !reset data_scores |
141 | !reset data_scores |
142 | !for u=1 to $usercnt |
142 | !for u=1 to $usercnt |
143 | !! reinitialise variables of type user_ |
143 | !! reinitialise variables of type user_ |
144 | !reset user_lastname,user_firstname,user_email,user_regnum,user_comments,\ |
144 | !reset user_lastname,user_firstname,user_email,user_regnum,user_comments,\ |
145 | user_external_auth,user_supervise,user_participate,user_supervisable |
145 | user_external_auth,user_supervise,user_participate,user_supervisable |
146 | !for n in $regvarlist |
146 | !for n in $regvarlist |
147 | !reset user_$n |
147 | !reset user_$n |
148 | !next |
148 | !next |
149 | l=!record $u of wimshome/log/classes/$wims_class/.userlist |
149 | l=!record $u of wimshome/log/classes/$wims_class/.userlist |
150 | user_login=!item 3 of $l |
150 | user_login=!item 3 of $l |
151 | uu=$user_login |
151 | uu=$user_login |
152 | uuu=!hex $uu |
152 | uuu=!hex $uu |
153 | !reset $basic,$dl4r |
153 | !reset $basic,$dl4r |
154 | !read adm/class/userdef classes,$wims_class,$user_login |
154 | !read adm/class/userdef classes,$wims_class,$user_login |
155 | !defread $userdef |
155 | !defread $userdef |
156 | user_participate=!items2words $user_participate |
156 | user_participate=!items2words $user_participate |
157 | user_supervise=!items2words $user_supervise |
157 | user_supervise=!items2words $user_supervise |
158 | !if $scores=yes |
158 | !if $scores=yes |
159 | !read adm/class/userscore $uu |
159 | !read adm/class/userscore $uu |
160 | user_average1=$per |
160 | user_average1=$per |
161 | user_average2=$(manual_$uuu) |
161 | user_average2=$(manual_$uuu) |
162 | !if average0 isitemof $dl |
162 | !if average0 isitemof $dl |
163 | user_average0=$[rint($manual*$user_average2+(100-$manual)*($per))/100] |
163 | user_average0=$[rint($manual*$user_average2+(100-$manual)*($per))/100] |
164 | !endif |
- | |
165 | !for i=1 to $sheetcnttot |
- | |
166 | !if sheet$i isitemof $dl and $i isitemof $activesh |
- | |
167 | p_=!line $i of $percents |
- | |
168 | !distribute words $p_ into p1,p2,p3,p4 |
- | |
169 | !if $p2!=$empty |
- | |
170 | ###f_$i is defined by var.proc.weights |
- | |
171 | !distribute item $[$p1/100],$[$p2/10],$[$p3/100],$[$p4/100] into x0_,y_,x1_,x2_ |
- | |
172 | !set ff_$i=!mathsubst Q=$y_ in $(f_$i) |
- | |
173 | !for sev=0 to 2 |
- | |
174 | !set ff_$i=!mathsubst I$sev=$(x$(sev)_) in $(ff_$i) |
- | |
175 | !next |
- | |
176 | user_sheet$i=$[rint(100*$scoremax*$(ff_$i))/100] |
- | |
177 | !else |
- | |
178 | user_sheet$i=0 |
- | |
179 | !endif |
164 | !endif |
- | 165 | !for i=1 to $sheetcnttot |
|
- | 166 | !if sheet$i isitemof $dl and $i isitemof $activesh |
|
- | 167 | p_=!line $i of $percents |
|
- | 168 | !distribute words $p_ into p1,p2,p3,p4 |
|
- | 169 | !if $p2!=$empty |
|
- | 170 | ###f_$i is defined by var.proc.weights |
|
- | 171 | !distribute item $[$p1/100],$[$p2/10],$[$p3/100],$[$p4/100] into x0_,y_,x1_,x2_ |
|
- | 172 | !set ff_$i=!mathsubst Q=$y_ in $(f_$i) |
|
- | 173 | !for sev=0 to 2 |
|
- | 174 | !set ff_$i=!mathsubst I$sev=$(x$(sev)_) in $(ff_$i) |
|
- | 175 | !next |
|
- | 176 | user_sheet$i=$[rint(100*$scoremax*$(ff_$i))/100] |
|
- | 177 | !else |
|
- | 178 | user_sheet$i=0 |
|
- | 179 | !endif |
|
180 | !endif |
180 | !endif |
181 | !next i |
181 | !next i |
182 | !for i=1 to $sheetcnttot |
182 | !for i=1 to $sheetcnttot |
183 | !if sheet$(i)_exo isin $dl and $i isitemof $activesh |
183 | !if sheet$(i)_exo isin $dl and $i isitemof $activesh |
184 | !let e_=!recordcnt wimshome/log/classes/$wims_class/sheets/.sheet$i |
184 | !let e_=!recordcnt wimshome/log/classes/$wims_class/sheets/.sheet$i |
185 | !for k_ = 1 to $e_ |
185 | !for k_ = 1 to $e_ |
186 | d_=!getscore user=$uu sheet=$i work=$k_ |
186 | d_=!getscore user=$uu sheet=$i work=$k_ |
187 | dd_=!getscorerequire user=$uu sheet=$i work=$k_ |
187 | dd_=!getscorerequire user=$uu sheet=$i work=$k_ |
188 | m_=!getscoremean user=$uu sheet=$i work=$k_ |
188 | m_=!getscoremean user=$uu sheet=$i work=$k_ |
189 | b_=!getscorebest user=$uu sheet=$i work=$k_ |
189 | b_=!getscorebest user=$uu sheet=$i work=$k_ |
190 | l_=!getscorelevel user=$uu sheet=$i work=$k_ |
190 | l_=!getscorelevel user=$uu sheet=$i work=$k_ |
191 | user_sheet$(i)_exo_$(k_)_Q=$[$m_] |
191 | user_sheet$(i)_exo_$(k_)_Q=$[$m_] |
192 | user_sheet$(i)_exo_$(k_)_I0=$[ceil(100*$d_/$dd_)] |
192 | user_sheet$(i)_exo_$(k_)_I0=$[ceil(100*$d_/$dd_)] |
193 | user_sheet$(i)_exo_$(k_)_I1=$[ceil(100*$b_/$dd_)] |
193 | user_sheet$(i)_exo_$(k_)_I1=$[ceil(100*$b_/$dd_)] |
194 | user_sheet$(i)_exo_$(k_)_I2=$[$l_] |
194 | user_sheet$(i)_exo_$(k_)_I2=$[$l_] |
195 | !next k_ |
195 | !next k_ |
196 | !endif |
196 | !endif |
197 | !next |
197 | !next |
198 | !if _exexo_ isin $dl or examduration isin $dl |
198 | !if _exexo_ isin $dl or examduration isin $dl |
199 | logdir=$wims_home/log/classes/$wims_class/examlog/$uu |
199 | logdir=$wims_home/log/classes/$wims_class/examlog/$uu |
200 | checksessions=!sh if [ -d $logdir ]; then cd $logdir; ls -tr; fi |
200 | checksessions=!sh if [ -d $logdir ]; then cd $logdir; ls -tr; fi |
201 | checksessions=!words2items $checksessions |
201 | checksessions=!words2items $checksessions |
202 | !read adm/class/userscore1 $uu |
202 | !read adm/class/userscore1 $uu |
203 | !endif |
203 | !endif |
204 | !for i=1 to $examcnttot |
204 | !for i=1 to $examcnttot |
205 | !if exam$i isitemof $dl and $i isitemof $activexams |
205 | !if exam$i isitemof $dl and $i isitemof $activexams |
206 | user_exam$i=$[rint(10*$scoremax*$(es_$i))/100] |
206 | user_exam$i=$[rint(10*$scoremax*$(es_$i))/100] |
207 | !endif |
207 | !endif |
208 | !if examduration$i isitemof $dl and $i isitemof $activexams |
208 | !if examduration$i isitemof $dl and $i isitemof $activexams |
209 | user_examduration$i=!replace internal , by $ $ in $quote$(Dureeexam_$i)$quote |
209 | user_examduration$i=!replace internal , by $ $ in $quote$(Dureeexam_$i)$quote |
210 | !endif |
210 | !endif |
211 | !if exam$(i)_exexo isin $dl and $i isitemof $activexams |
211 | !if exam$(i)_exexo isin $dl and $i isitemof $activexams |
212 | !set nb_ses=!record $i of wimshome/log/classes/$wims_class/exams/.exams |
212 | !set nb_ses=!record $i of wimshome/log/classes/$wims_class/exams/.exams |
213 | !set nb_ses=!line 3 of $nb_ses |
213 | !set nb_ses=!line 3 of $nb_ses |
214 | !set nb_ses=!word 2 of $nb_ses |
214 | !set nb_ses=!word 2 of $nb_ses |
215 | !let e_=!recordcnt wimshome/log/classes/$wims_class/exams/.exam$i |
215 | !let e_=!recordcnt wimshome/log/classes/$wims_class/exams/.exam$i |
216 | !set checksessions_cnt=!itemcnt $checksessions |
216 | !set checksessions_cnt=!itemcnt $checksessions |
217 | !for k_ = 1 to $e_ |
217 | !for k_ = 1 to $e_ |
218 | !reset t_ |
218 | !reset t_ |
219 | !set n_ses=0 |
219 | !set n_ses=0 |
220 | !for ses=1 to $checksessions_cnt |
220 | !for ses=1 to $checksessions_cnt |
221 | !if $i isitemof $(exam_$ses) |
221 | !if $i isitemof $(exam_$ses) |
222 | !set tmp=$(Exam_$(i)_$ses) |
222 | !set tmp=$(Exam_$(i)_$ses) |
223 | !set t_=$t_$(tmp[$k_]), |
223 | !set t_=$t_$(tmp[$k_]), |
224 | !increase n_ses |
224 | !increase n_ses |
- | 225 | !endif |
|
- | 226 | !next |
|
- | 227 | !set t_=$(t_[1..-2]) |
|
- | 228 | !if $nb_ses>$n_ses |
|
- | 229 | !set oo=!makelist $ $ for x=1 to $[$nb_ses-$n_ses-1] |
|
- | 230 | !! leave the space ! useful for some spreadsheet |
|
- | 231 | !set t_=$t_ ,$oo |
|
225 | !endif |
232 | !endif |
- | 233 | !set user_exam$(i)_exexo_$(k_)=!replace internal , by : in $t_ |
|
226 | !next |
234 | !next |
227 | !set t_=$(t_[1..-2]) |
- | |
228 | !if $nb_ses>$n_ses |
- | |
229 | !set oo=!makelist $ $ for x=1 to $[$nb_ses-$n_ses-1] |
- | |
230 | !! leave the space ! useful for some spreadsheet |
- | |
231 | !set t_=$t_ ,$oo |
- | |
232 |
|
235 | !endif |
233 | !set user_exam$(i)_exexo_$(k_)=!replace internal , by : in $t_ |
- | |
234 | !next |
- | |
235 | !endif |
- | |
236 | !next i |
236 | !next i |
237 | !for i=1 to $gcnt |
237 | !for i=1 to $gcnt |
238 | !if manual$i isitemof $dl |
238 | !if manual$i isitemof $dl |
239 | user_manual$i=!item $i of $(Manual_$uuu) |
239 | user_manual$i=!item $i of $(Manual_$uuu) |
240 | !default user_manual$i=0 |
240 | !default user_manual$i=0 |
241 | !endif |
241 | !endif |
242 | !next i |
242 | !next i |
243 | !endif |
243 | !endif |
244 | tmp=!trim $dl4 |
244 | tmp=!trim $dl4 |
245 | !appendfile $fname $dl2$tmp |
245 | !appendfile $fname $dl2$tmp |
246 | data_scores=!append item $dl2$tmp to $data_scores |
246 | data_scores=!append item $dl2$tmp to $data_scores |
247 | !next u |
247 | !next u |
248 | 248 | ||
249 | infile=spreadsheet.$csvformat |
249 | infile=spreadsheet.$csvformat |
250 | outfile=$fbase.$csvformat |
250 | outfile=$fbase.$csvformat |
251 | !if $csvformat iswordof ods |
251 | !if $csvformat iswordof ods |
252 | !! it is format ods |
252 | !! it is format ods |
253 | !mexec csv/mkODS.py |
253 | !mexec csv/mkODS.py |
254 | !else |
254 | !else |
255 | !! it is format csv/tsv/xls |
255 | !! it is format csv/tsv/xls |
256 | !mexec csv/getprep.sh |
256 | !mexec csv/getprep.sh |
257 | !endif |
257 | !endif |