Rev 5368 | Rev 12479 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
23 | reyssat | 1 | !if $vote_status=$empty or \ |
2 | ($wims_user!=supervisor and $vote_status notwordof 1 2) |
||
3 | error=bad_vote |
||
4 | job=home |
||
5 | !changeto home.proc |
||
6 | !endif |
||
7 | |||
8 | wims_multiexec=pari maxima yacas |
||
9 | insmath_rawmath=yes |
||
10 | wims_backslash_insmath=yes |
||
11 | parmcnt=0 |
||
12 | !reset uvname, uvval, uvcnt |
||
13 | !readdef $userfile |
||
14 | !readdef $votedir/$vote.votes |
||
15 | !default vcnt=0 |
||
16 | |||
17 | !if $wims_user=supervisor or $vote_show>0 |
||
18 | !if $wims_user=supervisor |
||
19 | showres=2 |
||
20 | !else |
||
21 | showres=1 |
||
22 | !endif |
||
7198 | bpr | 23 | !!## user_vote_$Vote is created if the user has voted - the value can be yes |
5368 | bpr | 24 | !!##or a list of numbers according of the vote_option |
25 | !!## should we be more precise ? |
||
2150 | guerimand | 26 | whovote_login=!sh cd $wims_home/log/classes/$wims_superclass/.users;\ |
5368 | bpr | 27 | grep -r "!set user_vote_$Vote=" * | cut -d":" -f1; |
2150 | guerimand | 28 | whovote_login=!lines2items $whovote_login |
29 | whovote=$empty |
||
5349 | guerimand | 30 | whodontvote=$empty |
31 | nb=!recordcnt wimshome/log/classes/$wims_class/.userlist |
||
32 | !for k=1 to $nb |
||
33 | tmp=!record $k of wimshome/log/classes/$wims_class/.userlist |
||
34 | !distribute item $tmp into fn,ln,ll |
||
35 | !if $ll isitemof $whovote_login |
||
36 | whovote=!append item $fn $ln to $whovote |
||
37 | !else |
||
38 | whodontvote=!append item $fn $ln to $whodontvote |
||
39 | !endif |
||
2150 | guerimand | 40 | !next k |
23 | reyssat | 41 | !else |
42 | showres=0 |
||
43 | !endif |
||
44 |