Rev 7198 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7198 | Rev 12479 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | !if $vote_status=$empty or \ |
1 | !if $vote_status=$empty or \ |
2 | ($wims_user!=supervisor and $vote_status notwordof 1 2) |
2 | ($wims_user!=supervisor and $vote_status notwordof 1 2) |
3 | error=bad_vote |
3 | error=bad_vote |
4 | job=home |
4 | job=home |
5 | !changeto home.proc |
5 | !changeto home.proc |
6 | !endif |
6 | !endif |
7 | 7 | ||
8 | wims_multiexec=pari maxima yacas |
8 | wims_multiexec=pari maxima yacas |
9 | insmath_rawmath=yes |
9 | insmath_rawmath=yes |
10 | wims_backslash_insmath=yes |
10 | wims_backslash_insmath=yes |
Line 13... | Line 13... | ||
13 | !readdef $userfile |
13 | !readdef $userfile |
14 | !readdef $votedir/$vote.votes |
14 | !readdef $votedir/$vote.votes |
15 | !default vcnt=0 |
15 | !default vcnt=0 |
16 | 16 | ||
17 | !if $wims_user=supervisor or $vote_show>0 |
17 | !if $wims_user=supervisor or $vote_show>0 |
18 | !if $wims_user=supervisor |
18 | !if $wims_user=supervisor |
19 | showres=2 |
19 | showres=2 |
20 | !else |
- | |
21 | showres=1 |
- | |
22 | !endif |
- | |
23 | !!## user_vote_$Vote is created if the user has voted - the value can be yes |
- | |
24 | !!##or a list of numbers according of the vote_option |
- | |
25 | !!## should we be more precise ? |
- | |
26 | whovote_login=!sh cd $wims_home/log/classes/$wims_superclass/.users;\ |
- | |
27 | grep -r "!set user_vote_$Vote=" * | cut -d":" -f1; |
- | |
28 | whovote_login=!lines2items $whovote_login |
- | |
29 | whovote=$empty |
- | |
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 |
20 | !else |
38 |
|
21 | showres=1 |
39 | !endif |
22 | !endif |
- | 23 | !!## user_vote_$Vote is created if the user has voted - the value can be yes |
|
- | 24 | !!##or a list of numbers according of the vote_option |
|
- | 25 | !!## should we be more precise ? |
|
- | 26 | whovote_login=!sh cd $wims_home/log/classes/$wims_superclass/.users;\ |
|
- | 27 | grep -r "!set user_vote_$Vote=" * | cut -d":" -f1; |
|
- | 28 | whovote_login=!lines2items $whovote_login |
|
- | 29 | whovote=$empty |
|
- | 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 |
|
40 | !next k |
40 | !next k |
41 | !else |
41 | !else |
42 | showres=0 |
42 | showres=0 |
43 | !endif |
43 | !endif |
44 | - |