Rev 2184 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
23 | reyssat | 1 | |
2 | !if $ucnt>$maxuser |
||
3 | error=too_many_users |
||
4 | method=list |
||
5 | !exit |
||
6 | !endif |
||
7 | |||
8 | !bound cc between integer 1 and $gcnt+1 default $[$gcnt+1] |
||
9 | !bound percent between 0 and 100 default 0 |
||
10 | |||
11 | !if $reg=$empty or $title=$empty |
||
12 | !exit |
||
13 | !endif |
||
14 | |||
15 | !for i=1 to $uucnt |
||
16 | l_=!record $i+1 of wimshome/log/classes/$wims_class/.grades |
||
17 | n_=!item 1 of $l_ |
||
18 | n_=!hex $n_ |
||
19 | g_$n_=$l_ |
||
20 | !next i |
||
21 | |||
22 | title=!translate ,\ |
||
23 | $ to ; $ in $title |
||
24 | weight=$[$weight] |
||
25 | !bound weight between 0 and 1000 default 1 |
||
26 | !if $gcnt<$cc |
||
27 | titles=!append item $title to $titles |
||
28 | weights=!append item $weight to $weights |
||
29 | !else |
||
30 | titles=!replace item number $cc by $title in $titles |
||
31 | weights=!replace item number $cc by $weight in $weights |
||
32 | !endif |
||
33 | |||
34 | !writefile wimshome/log/classes/$wims_class/.grades :$percent\ |
||
35 | title,title,$titles\ |
||
36 | weights,weights,$weights |
||
37 | |||
38 | !for i=1 to $ucnt |
||
14325 | guerimand | 39 | !! c$i=$[$(c$i)] |
40 | !bound c$i between 0 and $maxscore default $empty |
||
23 | reyssat | 41 | n_=!item $i of $ulist |
42 | f_=!item $i of $flist |
||
43 | l_=!item $i of $llist |
||
44 | h_=!hex $n_ |
||
45 | v_=!item 3 to -1 of $(g_$h_) |
||
46 | t_=!itemcnt $v_ |
||
47 | !if $t_<$cc |
||
48 | !for k=$t_ to $cc-2 |
||
49 | v_=!append item $ to $v_ |
||
50 | !next k |
||
51 | v_=!append item $(c$i) to $v_ |
||
52 | !else |
||
53 | v_=!replace item number $cc by $(c$i) in $v_ |
||
54 | !endif |
||
55 | !appendfile wimshome/log/classes/$wims_class/.grades :$n_,$f_ $l_,$v_ |
||
56 | !next i |
||
57 | |||
58 | !read var.init |
||
59 |