Subversion Repositories wimsdev

Rev

Rev 8422 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8422 Rev 9909
Line 1... Line 1...
1
# GetScores
1
# GetScores
2
# Fournit les notes de la classes, separees par le caractere associe au format specifie
2
# Fournit les notes de la classes, separees par le caractere associe au format specifie
3
# NB : a comparer avec "Download" et GetCSV ?
3
# TODO : appeler directement les fonctions de userscore, comme c'est fait avec getcsv.
4
 
4
 
5
!bound format within csv, tsv, xls default xls
5
!bound format within csv, tsv, xls default xls
6
 
6
 
7
!read scripts/check.class
7
!read scripts/check.class
8
!if $error!=$empty
8
!if $error!=$empty
Line 136... Line 136...
136
tit=!replace , by $quote,$quote in $quote$tit$quote
136
tit=!replace , by $quote,$quote in $quote$tit$quote
137
tit=!translate , to $sep in $dl
137
tit=!translate , to $sep in $dl
138
!for n in login,password,lastname,firstname,email,regnum,comments
138
!for n in login,password,lastname,firstname,email,regnum,comments
139
 dl2=!replace user_$n by $(quote)user_$n$quote in $dl2
139
 dl2=!replace user_$n by $(quote)user_$n$quote in $dl2
140
!next n
140
!next n
-
 
141
 
-
 
142
!read csv/csvnames
-
 
143
 
141
dl3=!replace user_ by $$name_ in $dl2
144
dl3=!replace user_ by $$name_ in $dl2
142
dl2=!replace user_ by $$user_ in $dl2
145
dl2=!replace user_ by $$user_ in $dl2
143
 
146
 
144
scores=no
147
scores=no
145
!if average isin $dl or manual isin $dl or sheet isin $dl or exam isin $dl
148
!if average isin $dl or manual isin $dl or sheet isin $dl or exam isin $dl
146
 scores=yes
149
 scores=yes
147
!endif
150
!endif
148
 
151
 
-
 
152
!read csv/csvnames
149
!read names.$lang
153
!read names.$lang
150
 
-
 
151
 
-
 
152
 
154
 
153
s=!record 0 of wimshome/log/classes/$qclass/sheets/.severity
155
s=!record 0 of wimshome/log/classes/$qclass/sheets/.severity
154
scoremax=!line 1 of $s
156
scoremax=!line 1 of $s
155
!default scoremax=20
157
!default scoremax=20
156
 
158
 
Line 178... Line 180...
178
   user_average0=$[rint($manual*$user_average2+(100-$manual)*($per))/100]
180
   user_average0=$[rint($manual*$user_average2+(100-$manual)*($per))/100]
179
  !endif
181
  !endif
180
  !for i=1 to $sheetcnt
182
  !for i=1 to $sheetcnt
181
   !if sheet$i isitemof $dl
183
   !if sheet$i isitemof $dl
182
    p_=!line $i of $percents
184
    p_=!line $i of $percents
183
!! cfr r7612-r7638 for adm/class/userscore
185
!! cf r7612-r7638 for adm/class/userscore
184
!!   and r7638-r7664
186
!!   and r7638-r7664
185
    !distribute words $p_ into p1,p2,p3,p4
187
    !distribute words $p_ into p1,p2,p3,p4
186
    !if $p2!=$empty
188
    !if $p2!=$empty
187
     !distribute item $[$p1/100],$[$p2/10],$[$p3/100],$[$p4/100] into x0_,y_,x1_,x2_
189
     !distribute item $[$p1/100],$[$p2/10],$[$p3/100],$[$p4/100] into x0_,y_,x1_,x2_
188
     !set ff_$i=!mathsubst Q=$y_ in $(f_$i)
190
     !set ff_$i=!mathsubst Q=$y_ in $(f_$i)
Line 206... Line 208...
206
    !default user_manual$i=0
208
    !default user_manual$i=0
207
   !endif
209
   !endif
208
  !next i
210
  !next i
209
 !endif
211
 !endif
210
 data_scores=!append item $dl2 to $data_scores
212
 data_scores=!append item $dl2 to $data_scores
211
 data_csv=!append line $dl2 to $data_csv  
213
 data_csv=!append line $dl2 to $data_csv
212
!next u
214
!next u
213
 
215