Subversion Repositories wimsdev

Rev

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

Rev Author Line No. Line
862 guerimand 1
!read adm/class/userisinclass ,$getuser
2
!if yes notin $script_reply
3
 error=bad_usercls
4
 !reset job,getuser
5
 !exit
6
!endif
23 reyssat 7
 
8
!if $getuser!=$empty
12465 bpr 9
  m=!record 1 of wimshome/log/classes/$wims_class/.grades
10
  !distribute lines $m into manual,titles,weights
11
  gcnt=!itemcnt $titles
12
  gcnt=$[$gcnt-2]
13
  !if $gcnt<1
14
    manual=0
15
  !else
16
    mwtot=0
17
    !for g=1 to $gcnt
18
      w$g=!item $g+2 of $weights
19
      mwtot=$[$mwtot+$(w$g)]
20
    !next g
4581 bpr 21
  !endif
12465 bpr 22
  !if $manual>0
23
    uucnt=!recordcnt wimshome/log/classes/$wims_class/.grades
24
    !for u=2 to $uucnt
25
      l_=!record $u of wimshome/log/classes/$wims_class/.grades
26
      n_=!item 1 of $l_
27
      !if $n_=$getuser
28
        teacher=!item 3 to -1 of $l_
29
        !break
30
      !endif
31
    !next u
32
    mav=0
33
    !for i=1 to $gcnt
34
      g_$i=!item $i of $teacher
14993 guerimand 35
      !if $(g_$i)!=$empty
36
        mav=$[$mav+($(g_$i))*($(w$i))]
37
      !endif
12465 bpr 38
    !next i
39
     mav=$[rint(100*$mav/$mwtot)/100]
40
  !else
41
    mav=0
42
  !endif
43
  t=!translate = to , in $wims_req_time
44
  t=!item -1 of $t
45
  means=!record 0 of wimshome/log/classes/$wims_class/scoreavg
46
  topscores=!record 0 of wimshome/log/classes/$wims_class/.scoretop
16807 guerimand 47
  topnb=!defof class_topscores\
48
class_limit\
49
class_hideaverage in wimshome/log/classes/$wims_class/.def
50
  !distribute line $topnb into topnb,classnb,class_hideaverage
12465 bpr 51
  !for ic=1 to $classnb
52
    UU=!line $ic of $topscores
53
    UU1=!item 4 of $UU
54
    VV=!append line $UU1 to $VV
55
    WW=!append line $UU to $WW
56
  !next ic
57
  VV=!sort reverse numeric line  $VV
58
  !readdef wimshome/log/classes/$wims_class/.def
59
  !default class_topscores=0
60
  !for s=1 to $class_topscores
61
    ic=!item $s of $wims_sort_order
62
    LL=!line $ic of $WW
63
    TT=!append line $LL to $TT
64
  !next s
65
  ot=!line 1 of $means
66
  !if $ot=$empty or $ot<$t-3
67
    !read var.avg
68
    !if $class_type notwordof 2 3 4
69
      !if $class_topscores>0
70
        !read var.topscores
71
      !endif
72
    !endif
73
  !endif
74
  l=!line 2 of $means
7638 bpr 75
 
12465 bpr 76
  !distribute words $l into\
14333 bpr 77
    min_auto,mean_auto,max_auto,\
78
    min_tea,mean_tea,max_tea,\
79
    min_glob,mean_glob,max_glob
12465 bpr 80
  c=!linecnt $means
81
  !for i=3 to $c
82
    l=!line $i of $means
83
    s=!word 1 of $l
84
    !distribute words $l into x0_,min_$s,mean_$s,max_$s
85
  !next i
86
  uu=$getuser
87
  !read adm/class/userscore
88
  globalav=$[rint($manual*$mav+((100-$manual)*$per))/100]
89
  exologs=!filelist $wims_home/log/classes/$wims_class/exolog/$getuser
15963 guerimand 90
  !readproc adm/vfilter/listvarfilter.proc
91
  !readproc adm/class/userdef ,$wims_class,$getuser
92
  !readproc adm/vfilter/uservarfilter.proc $userdef
23 reyssat 93
!else
12465 bpr 94
  job=
23 reyssat 95
!endif
96
 
97
!if $wims_user=supervisor
12465 bpr 98
  !read var.proc.userexam
23 reyssat 99
!endif