Subversion Repositories wimsdev

Rev

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

Rev 8528 Rev 8674
Line 1... Line 1...
1
 
1
 
2
# Variables used: defaultformula in adm/class/userlist/var.proc
2
# Variables used: defaultformula in adm/class/userlist/var.proc
3
!! defaultformula in  wimshome/log/classes/$wims_class/sheets/.severity
3
!! defaultformula in wimshome/log/classes/$wims_class/sheets/.severity
4
 
4
 
5
!! Output variables:
5
!! Output variables:
6
!!
6
!!
7
!! f_$i: formula of sheet $i.
7
!! f_$i: formula of sheet $i.
8
!! w_$i: weight of sheet $i.
8
!! w_$i: weight of sheet $i.
Line 11... Line 11...
11
!set totweight=0
11
!set totweight=0
12
!set totsheets=!recordcnt wimshome/log/classes/$wims_class/sheets/.sheets
12
!set totsheets=!recordcnt wimshome/log/classes/$wims_class/sheets/.sheets
13
!set totexams=!recordcnt wimshome/log/classes/$wims_class/exams/.exams
13
!set totexams=!recordcnt wimshome/log/classes/$wims_class/exams/.exams
14
!set examweights=!record 0 of wimshome/log/classes/$wims_class/exams/.eseverity
14
!set examweights=!record 0 of wimshome/log/classes/$wims_class/exams/.eseverity
15
!set formula_list=!record 0 of adm/class/sheetformula
15
!set formula_list=!record 0 of adm/class/sheetformula
16
!for i=1 to $totsheets
16
!for i_=1 to $totsheets
17
 !set f_=!line $i of $defaultformula
17
 !set f_=!line $i_ of $defaultformula
18
 !distribute word $f_ into w_$i,s,ss
18
 !distribute word $f_ into w_$i_,s,ss
19
 !default w_$i=1
19
 !default w_$i_=1
20
 !bound s between integer 0 and 6 default 2
20
 !bound s between integer 0 and 6 default 2
21
 !bound ss between integer 0 and 2 default 0
21
 !bound ss between integer 0 and 2 default 0
22
!!  f_$i=!line $s+1 of max($$x$(ss)_,$$y_)\
22
!!  f_$i_=!line $s+1 of max($$x$(ss)_,$$y_)\
23
$$x$(ss)_\
23
$$x$(ss)_\
24
$$x$(ss)_*$$y_^0.3\
24
$$x$(ss)_*$$y_^0.3\
25
$$x$(ss)_*$$y_^0.5\
25
$$x$(ss)_*$$y_^0.5\
26
$$x$(ss)_*$$y_\
26
$$x$(ss)_*$$y_\
27
$$x$(ss)_^2*$$y_\
27
$$x$(ss)_^2*$$y_\
28
($$x$(ss)_*$$y_)^2
28
($$x$(ss)_*$$y_)^2
29
 
29
 
30
!set f_$i=!record 0 of adm/class/sheetformula
30
!set f_$i_=!record 0 of adm/class/sheetformula
31
!set f_$i=!item $s+1 of $(f_$i)
31
!set f_$i_=!item $s+1 of $(f_$i_)
32
!set f_$i=!replace internal I by I$ss in $(f_$i)
32
!set f_$i_=!replace internal I by I$ss in $(f_$i_)
33
 !if $i isitemof $activesh
33
 !if $i_ isitemof $activesh
34
  !set totweight=$[$totweight+$(w_$i)]
34
  !set totweight=$[$totweight+$(w_$i_)]
35
 !endif
35
 !endif
36
 !set s_$i=$s
36
 !set s_$i_=$s
37
 !set ss_$i=$ss
37
 !set ss_$i_=$ss
38
!next i
38
!next i_
39
 
39
 
40
!for i=1 to $totexams
40
!for i_=1 to $totexams
41
 !set ew_$i=!line $i of $examweights
41
 !set ew_$i_=!line $i_ of $examweights
42
 !default ew_$i=1
42
 !default ew_$i_=1
43
 !if $i isitemof $activexams
43
 !if $i_ isitemof $activexams
44
  !set totweight=$[$totweight+$(ew_$i)]
44
  !set totweight=$[$totweight+$(ew_$i_)]
45
 !endif
45
 !endif
46
!next i
46
!next i_