Subversion Repositories wimsdev

Rev

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

Rev Author Line No. Line
23 reyssat 1
# class exercise sheet
2
!if $wims_read_parm > 0 && $wims_class > 0
3
 s_=wimshome/log/classes/$wims_class/sheets/.sheet$wims_read_parm
4
 ecnt_=!recordcnt $s_
5
!endif
6
 
7
deps=
8
sessionbase=!translate _ to $ $ in $wims_sesdir
9
sessionbase=!word 1 of $sessionbase
10
 
11
depfile=wimshome/$sessionbase/exodep.$wims_read_parm
12
!writefile $depfile
13
!if $ecnt_<=0
14
 !exit
15
!endif
16
 
17
!for i=1 to $ecnt_
18
 a_$i=!word $i of $scores
19
 b_$i=!word $i of $means
20
 c_$i=!word $i of $requires
21
!next i
22
 
23
!for i=1 to $ecnt_
24
 l_=!record $i of $s_
25
 d_=!line 7 of $l_
26
 d_=!trim $d_
27
 C_=
28
 !if $d_!=$empty
29
  d_=!translate internal , to $\
30
$ in $d_
31
  d_=!translate internal +: to $ , in $d_
32
  d_=!nonempty lines $d_
33
  N_=!linecnt $d_
34
  !for j=1 to $N_
35
   l_=!line $j of $d_
36
   !distribute items $l_ into e_,p_
37
   !if $p_>0 and $p_<=100
38
    e_=!words2items $e_
39
    !distribute items 0,0,0 into sum_,mean_,user_,term_
40
    !for e in $e_
41
     !if $e>0 and $e<256
42
      term_=$[$term_+10]
43
      sum_=$[$sum_+$(c_$e)]
44
      mean_=$[$mean_+$(b_$e)]
45
      user_=$[$user_+$(a_$e)]
46
     !endif
47
    !next
48
    !if $sum_>0 and $user_*sqrt($mean_/$term_)/$sum_*100<$p_
49
     C_=!append item $e_ to $C_
50
    !endif
51
   !endif
52
  !next j
53
  C_=!listuniq $C_
54
 !endif
55
 !appendfile $depfile :$C_
56
 deps=$deps$C_;
57
!next i