!! html 
file to show result of vote
  
 
 
!for k in $listjob2
 
 !if $job2!=$k
 
  !set wims_ref_class=wims_button
 
  !href cmd=reply&job2=$k $(name_show$k)
 
 !endif
 
 
 
!if $wims_user=supervisor
 
 !set wims_ref_class=wims_button
 
 !href cmd=reply&job=csv $wims_name_csv
 
!endif
 
 
 
<div class="emptyline"></div>
 
 
 
!if $job2=$empty
 
!else
 
!goto $job2  
 
!endif
 
 
 
:global
 
 
 
 $table_header
 
   $table_hdtr <th>$wims_name_number</th><th>$wims_name_Type</th><th colspan="$max_rep">$name_thisvote_answer</th></tr>
 
 !for k=1 to $parmcnt
 
  !if textarea=$(vote_description[$k;2])
 
   !set rowspan=1
 
  !else
 
   !set rowspan=2
 
  !endif
 
  <tr class="$(table_colors[$k%2+1])">
 
   !if uservar!=$(vote_description[$k;2])
 
    <td rowspan="$rowspan" align="center">$(vote_description[$k;1])</td>
 
    <td rowspan="$rowspan" align="center">$(vote_description[$k;2])</td>
 
    !if textarea=$(vote_description[$k;2])
 
     <td rowspan="$rowspan" align="left" valign="top" colspan="$max_rep">
 
      !set comment_$k = !replace internal --- by $\
 
  $<br/>- in $(comment_$k)
 
      !set rcnt=!recordcnt $votedir/$(vote)_$k.comments
 
      <ul>
 
      !for j=1 to $rcnt
 
       <li>
 
        !record $j of $votedir/$(vote)_$k.comments
 
       </li>
 
      </ul>
 
     </td>
 
    !else
 
     !let tmp=!item 3 to -1 of $(vote_description[$k;])
 
     !let nb=!itemcnt $tmp
 
     !for j in $tmp
 
      <td align="center">$j</td>
 
     !if $nb<$max_rep
 
      <td colspan="$[$max_rep-$nb]" rowspan="2"> </td>
 
     !endif
 
    </tr>
 
    <tr class="$(table_colors[$k%2+1])">
 
     !for j=1 to $nb
 
      <td align="center">$(vcnt_$(k)_$(j))</td>
 
    !endif
 
   </tr>
 
  !endif
 
 $table_end
 
 
 
 $table_header
 
  $table_hdtr <th>$wims_name_number</th><th>$wims_name_Type</th>
 
   !items2words $namelist
 
  </tr>
 
  !for k=1 to $parmcnt
 
   !if uservar!=$(vote_description[$k;2])
 
    $table_tr
 
     <td align="center">
 
      $name_question
 
     $(vote_description[$k;1])
 
     </td>
 
     <td align="center">$(vote_description[$k;2])</td>
 
     !for u=1 to $vcnt
 
      !if textarea=$(vote_description[$k;2])
 
       <td style="max-width:100px;font-size:0.8em;">
 
       !record $u of $votedir/$(vote)_$(k).comments
 
      !else
 
       <td>
 
       !item $u of $(donvote_$k)
 
      !endif
 
      </td>
 
    </tr>
 
   !endif
 
 $table_end
 
 
 
:listbystudent
 
 <div class="emptyline"></div>
 
 $table_header
 
  $table_hdtr
 
  <td></td>
 
  !for k=1 to $parmcnt
 
   !if uservar!=$(vote_description[$k;2])
 
    <td align="center">$name_question $(vote_description[$k;1])</td>
 
   !endif
 
  </tr>
 
  !for u=1 to $vcnt
 
   $table_tr
 
     $(namelist[$u])
 
  !for k=1 to $parmcnt
 
     !if uservar!=$(vote_description[$k;2])
 
      !if textarea=$(vote_description[$k;2])
 
       <td style="max-width:100px;font-size:0.8em;">
 
        !record $u of $votedir/$(vote)_$(k).comments
 
      !else
 
       <td align="center">
 
        !item $u of $(donvote_$k)
 
      !endif
 
      </td>
 
     !endif
 
   </tr>
 
 $table_end
 
!endif
 
 
 
 
 
:studentbyitem
 
!if $wims_user=supervisor and $vote_option!=anonymous
 
 <p> $name_details
 
 !for i=1 to $parmcnt
 
  !for c=1 to $(choices$i)
 
   !if /supervisor/ notin $c/
 
    <p>$i - $(vote_description[$i;$c+2]) <br/>
 
    <pre>
 
     !for u in $(votes_$(i)_$c)
 
      !if $vote_option=nominative
 
!!## 
 
       !set U=!translate internal / to , in $u
 
       !set U1 = !replace internal , by / in $(U[1..-2])
 
       !set U = !nospace $U1,$(U[-1])
 
       $U
 
       !readproc adm/class/userdef classes,$U
 
       !defof user_lastname, user_firstname in $userdef
 
 ($u)
 
      !else 
 
 ($u) 
 
      !endif
 
    </pre>
 
   !endif
 
!endif
 
 
 
 
 
!set wims_menu_items=!append line back2,1,cmd=reply&job=read&vote=$vote to $wims_menu_items