Subversion Repositories wimsdev

Rev

Rev 12555 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 12555 Rev 13711
Line 2... Line 2...
2
!!one line by sheet : points quality best level
2
!!one line by sheet : points quality best level
3
percents=!getscorepercent user=$uu
3
percents=!getscorepercent user=$uu
-
 
4
!if $showsheet=$empty
-
 
5
  shlist=$activesh
-
 
6
  exlist=$activexams
-
 
7
!else
-
 
8
  shlist=$showsheet
-
 
9
  shlist=!listintersect $activesh and $shlist
-
 
10
  exlist=!items2lines $showsheet
-
 
11
  exlist=!replace internal E by E, in $exlist
-
 
12
  exlist=!select $exlist where column 1=E
-
 
13
  exlist=$(exlist[;2])
-
 
14
  exlist=!listintersect $activexams and $exlist
-
 
15
!endif
4
 
16
 
5
percnt=!linecnt $percents
-
 
6
!distribute items 0,0 into per,av
17
!distribute items 0,0 into per,av
7
 
18
 
8
!! w_$i etc are defined in sheetweights
19
!! w_$i etc are defined in sheetweights
9
!! give an average for all sheets and for the user $uu - even not seen in sequences ??
20
!! give an average for all active sheets (or in showsheet) and for the user $uu
-
 
21
!! - even not seen in sequences ??
10
 
22
 
11
!for i=1 to $percnt
23
!for i in $shlist
12
  !if  $(f_$i)=$empty or $(w_$i)=$empty
24
  !if $(f_$i)=$empty or $(w_$i)=$empty
13
    !read adm/class/sheetweights
25
    !read adm/class/sheetweights
14
  !endif
26
  !endif
15
  perc=!line $i of $percents
27
  perc=!line $i of $percents
16
  !distribute words $perc into p1,p2,p3,p4
28
  !distribute words $perc into p1,p2,p3,p4
17
  !if $p2!=$empty and $(w_$i)!=$empty
29
  !if $p2!=$empty and $(w_$i)!=$empty
Line 21... Line 33...
21
      !set ff_$i=!mathsubst I$sev=$(x$(sev)_) in $(ff_$i)
33
      !set ff_$i=!mathsubst I$sev=$(x$(sev)_) in $(ff_$i)
22
    !next
34
    !next
23
    per=$[$per+($(w_$i))*$(ff_$i)]
35
    per=$[$per+($(w_$i))*$(ff_$i)]
24
  !endif
36
  !endif
25
!next i
37
!next i
-
 
38
!if $showsheet!=$empty
-
 
39
  totweight=0
-
 
40
  !for i in $shlist
-
 
41
    !set totweight=$[$totweight+$(w_$i)]
-
 
42
  !next i
-
 
43
!endif
26
 
44
 
27
examout=!examscore user=$uu
45
examout=!examscore user=$uu
28
 
46
 
29
!for i in $activexams
47
!for i in $exlist
30
  es_$i=!line 1 of $examout
48
  es_$i=!line 1 of $examout
31
  es__$i=!word $i of $(es_$i)
49
  es__$i=!word $i of $(es_$i)
32
  !!it happens that es__$i is empty, so we calculate per with 0 instead
50
  !!it happens that es__$i is empty, so we calculate per with 0 instead
33
  es_$i=$(es__$i)
51
  es_$i=$(es__$i)
34
  !default es_$i=0
52
  !default es_$i=0
35
  per=$[$per+$(ew_$i)*$(es_$i)/10]
53
  per=$[$per+$(ew_$i)*$(es_$i)/10]
36
  es_$i=$(es__$i)
54
  es_$i=$(es__$i)
-
 
55
  !if $showsheet!=$empty
-
 
56
    !set totweight=$[$totweight+$(ew_$i)]
-
 
57
  !endif
37
!next i
58
!next i
38
 
59
 
39
!if $totweight>0
60
!if $totweight>0
40
  per=$[rint($scoremax*100*$per/$totweight)/100]
61
  per=$[rint($scoremax*100*$per/$totweight)/100]
41
!else
62
!else