Rev 16807 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 16807 | Rev 17780 | ||
---|---|---|---|
Line 4... | Line 4... | ||
4 | !reset job,getuser |
4 | !reset job,getuser |
5 | !exit |
5 | !exit |
6 | !endif |
6 | !endif |
7 | 7 | ||
8 | !if $getuser!=$empty |
8 | !if $getuser!=$empty |
- | 9 | ||
- | 10 | !! freeworks |
|
- | 11 | !! |
|
- | 12 | !! freworks are only listed in student score page if student has done |
|
- | 13 | !! some work on the freework (for some types, just opened the freework) |
|
- | 14 | test=!defof allowed_optional_module in wimshome/log/wims.conf |
|
- | 15 | !if class/freework isitemof $test |
|
- | 16 | allowed_freework=yes |
|
- | 17 | !else |
|
- | 18 | !reset allowed_freework,freeworkcnt |
|
- | 19 | !endif |
|
- | 20 | !if $allowed_freework=yes and $job=getuser and $getuser!=$empty |
|
- | 21 | activefreew=$empty |
|
- | 22 | freeworkcnt=!recordcnt wimshome/log/classes/$wims_class/freeworks/.freeworks |
|
- | 23 | !for k=1 to $freeworkcnt |
|
- | 24 | t=!record $k of wimshome/log/classes/$wims_class/freeworks/.freeworks |
|
- | 25 | st_=!line 1 of $t |
|
- | 26 | !if $st_ isitemof 1,2 |
|
- | 27 | ty_=!line 6 of $t |
|
- | 28 | !if $ty_=3 or $ty_=2 |
|
- | 29 | !readproc adm/freework/finduserwork.proc $k,$getuser |
|
- | 30 | !if $(output)!=0 |
|
- | 31 | activefreew=!append item $k to $activefreew |
|
- | 32 | !endif |
|
- | 33 | !endif |
|
- | 34 | !endif |
|
- | 35 | !next k |
|
- | 36 | !endif |
|
- | 37 | !set nbfreeworks=!itemcnt $activefreew |
|
- | 38 | ||
9 | m=!record 1 of wimshome/log/classes/$wims_class/.grades |
39 | m=!record 1 of wimshome/log/classes/$wims_class/.grades |
10 | !distribute lines $m into manual,titles,weights |
40 | !distribute lines $m into manual,titles,weights |
11 | gcnt=!itemcnt $titles |
41 | gcnt=!itemcnt $titles |
12 | gcnt=$[$gcnt-2] |
42 | gcnt=$[$gcnt-2] |
13 | !if $gcnt<1 |
43 | !if $gcnt<1 |
Line 17... | Line 47... | ||
17 | !for g=1 to $gcnt |
47 | !for g=1 to $gcnt |
18 | w$g=!item $g+2 of $weights |
48 | w$g=!item $g+2 of $weights |
19 | mwtot=$[$mwtot+$(w$g)] |
49 | mwtot=$[$mwtot+$(w$g)] |
20 | !next g |
50 | !next g |
21 | !endif |
51 | !endif |
- | 52 | !! need g_ for freeworks |
|
- | 53 | !! |
|
- | 54 | !! NOTE: for large classes adm/class/grades (i.e. manual score |
|
- | 55 | !! interfaces) is not available, but freeworks scoring works anyway |
|
- | 56 | !! and scores assigned to freeworks are visibile in this page. |
|
- | 57 | !! |
|
22 | !if $manual>0 |
58 | !if $manual>0 or $nbfreeworks>0 |
23 | uucnt=!recordcnt wimshome/log/classes/$wims_class/.grades |
59 | uucnt=!recordcnt wimshome/log/classes/$wims_class/.grades |
24 | !for u=2 to $uucnt |
60 | !for u=2 to $uucnt |
25 | l_=!record $u of wimshome/log/classes/$wims_class/.grades |
61 | l_=!record $u of wimshome/log/classes/$wims_class/.grades |
26 | n_=!item 1 of $l_ |
62 | n_=!item 1 of $l_ |
27 | !if $n_=$getuser |
63 | !if $n_=$getuser |
28 | teacher=!item 3 to -1 of $l_ |
64 | teacher=!item 3 to -1 of $l_ |
29 | !break |
65 | !break |
30 | !endif |
66 | !endif |
31 | !next u |
67 | !next u |
32 | mav=0 |
68 | mav=0 |
33 | !for i=1 to $gcnt |
69 | !for i=1 to $gcnt |
34 | g_$i=!item $i of $teacher |
70 | g_$i=!item $i of $teacher |
35 | !if $(g_$i)!=$empty |
71 | !if $(g_$i)!=$empty |
Line 38... | Line 74... | ||
38 | !next i |
74 | !next i |
39 | mav=$[rint(100*$mav/$mwtot)/100] |
75 | mav=$[rint(100*$mav/$mwtot)/100] |
40 | !else |
76 | !else |
41 | mav=0 |
77 | mav=0 |
42 | !endif |
78 | !endif |
- | 79 | ||
43 | t=!translate = to , in $wims_req_time |
80 | t=!translate = to , in $wims_req_time |
44 | t=!item -1 of $t |
81 | t=!item -1 of $t |
45 | means=!record 0 of wimshome/log/classes/$wims_class/scoreavg |
82 | means=!record 0 of wimshome/log/classes/$wims_class/scoreavg |
46 | topscores=!record 0 of wimshome/log/classes/$wims_class/.scoretop |
83 | topscores=!record 0 of wimshome/log/classes/$wims_class/.scoretop |
47 | topnb=!defof class_topscores\ |
84 | topnb=!defof class_topscores\ |
Line 88... | Line 125... | ||
88 | globalav=$[rint($manual*$mav+((100-$manual)*$per))/100] |
125 | globalav=$[rint($manual*$mav+((100-$manual)*$per))/100] |
89 | exologs=!filelist $wims_home/log/classes/$wims_class/exolog/$getuser |
126 | exologs=!filelist $wims_home/log/classes/$wims_class/exolog/$getuser |
90 | !readproc adm/vfilter/listvarfilter.proc |
127 | !readproc adm/vfilter/listvarfilter.proc |
91 | !readproc adm/class/userdef ,$wims_class,$getuser |
128 | !readproc adm/class/userdef ,$wims_class,$getuser |
92 | !readproc adm/vfilter/uservarfilter.proc $userdef |
129 | !readproc adm/vfilter/uservarfilter.proc $userdef |
- | 130 | ||
93 | !else |
131 | !else |
94 | job= |
132 | job= |
95 | !endif |
133 | !endif |
96 | 134 | ||
97 | !if $wims_user=supervisor |
135 | !if $wims_user=supervisor |