Subversion Repositories wimsdev

Rev

Rev 15726 | Details | Compare with Previous | Last modification | View Log | RSS feed

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