Subversion Repositories wimsdev

Rev

Rev 7198 | 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)
12479 bpr 3
  error=bad_vote
4
  job=home
5
  !changeto home.proc
23 reyssat 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
12479 bpr 18
  !if $wims_user=supervisor
19
    showres=2
5349 guerimand 20
  !else
12479 bpr 21
    showres=1
5349 guerimand 22
  !endif
12479 bpr 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
23 reyssat 41
!else
12479 bpr 42
  showres=0
23 reyssat 43
!endif