Subversion Repositories wimsdev

Rev

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

Rev 13761 Rev 14341
Line 214... Line 214...
214
  !for i=1 to $n
214
  !for i=1 to $n
215
    otypes=$otypes,o_$i
215
    otypes=$otypes,o_$i
216
  !next i
216
  !next i
217
  first=$l
217
  first=$l
218
  cnt=!recordcnt $fn
218
  cnt=!recordcnt $fn
-
 
219
  list_grades=$empty
219
  !for u=2 to $cnt
220
  !for u=2 to $cnt
220
    l=!record $u of $fn
221
    l=!record $u of $fn
221
    uu=!item 1 of $l
222
    uu=!item 1 of $l
-
 
223
    list_grades=!append item $uu to $list_grades
222
    orig_$uu=!item 2 to -1 of $l
224
    orig_$uu=!item 2 to -1 of $l
223
  !next u
225
  !next u
224
  !writefile $fn :$first
226
  !writefile $fn :$first
225
  cnt=!recordcnt $fu
227
  cnt=!recordcnt $fu
-
 
228
  list_user=$empty
-
 
229
  joker=--
226
  !for i=1 to $cnt
230
  !for i=1 to $cnt
227
    l_=!record $i of $fu
231
    l_=!record $i of $fu
228
    u=!item 3 of $l_
232
    u=!item 3 of $l_
-
 
233
    list_user=!append item $u to $list_user
229
    !distribute items $(dep_$u) into $types
234
    !distribute items $(dep_$u) into $types 
230
    !distribute items $(orig_$u) into $otypes
235
    !distribute items $(orig_$u) into $otypes
231
    t_=!defof user_firstname user_lastname in wimshome/$userdir/$u
236
    t_=!defof user_firstname user_lastname in wimshome/$userdir/$u
232
    !for i=1 to $n
237
    !for i=1 to $n
233
      l_=$[$(up_manual$i)]
238
      l_=$[$(up_manual$i)]
234
      !if NaN isin $l_ or Inf isin $l_ or $l_<0 or $l_>100000 or $(up_manual$i)=$empty
239
      !if NaN isin $l_ or Inf isin $l_ or $l_<0 or $l_>100000 or $(up_manual$i)=$empty
235
        l_=
240
        l_=$joker
236
      !endif
241
      !endif
237
      !default l_=$(o_$i)
242
      !default l_=$(o_$i)
-
 
243
      !default l_=$joker
238
      t_=!append item $l_ to $t_
244
      t_=!append item $l_ to $t_
239
    !next i
245
    !next i
-
 
246
    t_=!replace internal $joker by $empty in $t_
240
    !appendfile $fn :$u,$t_
247
    !appendfile $fn :$u,$t_
241
  !next u
248
  !next u
-
 
249
  list_deleted=!listcomplement $list_user in $list_grades
-
 
250
  !if $list_deleted!=$empty
-
 
251
    nbdel=!itemcnt $list_deleted
-
 
252
    !for k=1 to $nbdel
-
 
253
      !appendfile $fn :$(list_deleted[$k]),$(orig_$(list_deleted[$k]))
-
 
254
    !next k
-
 
255
  !endif
242
  wims_class_log=spreadsheet grades by $wims_realuser
256
  wims_class_log=spreadsheet grades by $wims_realuser
243
!endif
257
!endif