Subversion Repositories wimsdev

Rev

Rev 12479 | Rev 15755 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. !! html file to show result of vote
  2.  
  3. !for k in $listjob2
  4.   !if $job2!=$k
  5.     !set wims_ref_class=wims_button
  6.     !href cmd=reply&job2=$k $(name_show$k)
  7.   !endif
  8. !next k
  9.  
  10. !if $wims_user=supervisor
  11.   !set wims_ref_class=wims_button
  12.   !href cmd=reply&job=csv $wims_name_csv
  13. !endif
  14.  
  15. <br class="spacer" />
  16.  
  17. !if $job2=$empty
  18.   !goto end
  19. !else
  20.   !goto $job2
  21. !endif
  22.  
  23. :global
  24.  
  25. <table class="wimstable blockcenter">
  26. <thead>
  27.    $table_hdtr <th>$wims_name_number</th><th>$wims_name_Type</th><th colspan="$max_rep">$name_thisvote_answer</th></tr>
  28. </thead>
  29. <tbody>
  30. !for k=1 to $parmcnt
  31.   !if textarea=$(vote_description[$k;2])
  32.     !set rowspan=1
  33.   !else
  34.     !set rowspan=2
  35.   !endif
  36.   <tr class="$(table_colors[$k%2+1])">
  37.   !if uservar!=$(vote_description[$k;2])
  38.     <td rowspan="$rowspan">$(vote_description[$k;1])</td>
  39.     <td rowspan="$rowspan">$(vote_description[$k;2])</td>
  40.     !if textarea=$(vote_description[$k;2])
  41.       <td rowspan="$rowspan" style="text-align:left" valign="top" colspan="$max_rep">
  42.       !set comment_$k = !replace internal --- by $\
  43.   $<br />- in $(comment_$k)
  44.       !set rcnt=!recordcnt $votedir/$(vote)_$k.comments
  45.       <ul>
  46.       !for j=1 to $rcnt
  47.         <li>
  48.         !record $j of $votedir/$(vote)_$k.comments
  49.         </li>
  50.       !next j
  51.       </ul>
  52.      </td>
  53.     !else
  54.       !let tmp=!item 3 to -1 of $(vote_description[$k;])
  55.       !let nb=!itemcnt $tmp
  56.       !for j in $tmp
  57.         <td>$j</td>
  58.       !next j
  59.       !if $nb<$max_rep
  60.         <td colspan="$[$max_rep-$nb]" rowspan="2">&nbsp;</td>
  61.       !endif
  62.       </tr>
  63.       <tr class="$(table_colors[$k%2+1])">
  64.       !for j=1 to $nb
  65.         <td>$(vcnt_$(k)_$(j))</td>
  66.       !next j
  67.     !endif
  68.     </tr>
  69.   !endif
  70. !next k
  71. </tbody>
  72. $table_end
  73. !goto end
  74.  
  75. :list
  76.  $table_header
  77.   $table_hdtr <th>$wims_name_number</th><th>$wims_name_Type</th>
  78.    !items2words $namelist
  79.   </tr>
  80. !for k=1 to $parmcnt
  81.   !if uservar!=$(vote_description[$k;2])
  82.     $table_tr
  83.      <td>
  84.       $name_question
  85.      $(vote_description[$k;1])
  86.      </td>
  87.      <td>$(vote_description[$k;2])</td>
  88.     !for u=1 to $vcnt
  89.       !if textarea=$(vote_description[$k;2])
  90.         <td style="max-width:100px;font-size:0.8em;">
  91.         !record $u of $votedir/$(vote)_$(k).comments
  92.       !else
  93.         <td>
  94.         !item $u of $(donvote_$k)
  95.       !endif
  96.       </td>
  97.     !next u
  98.     </tr>
  99.   !endif
  100. !next k
  101. $table_end
  102. !goto end
  103.  
  104. :listbystudent
  105.  <br class="spacer" />
  106.  $table_header
  107.   $table_hdtr
  108.   <td></td>
  109. !for k=1 to $parmcnt
  110.   !if uservar!=$(vote_description[$k;2])
  111.     <td>$name_question $(vote_description[$k;1])</td>
  112.   !endif
  113. !next k
  114. </tr>
  115. !for u=1 to $vcnt
  116.   $table_tr
  117.   $(namelist[$u])
  118.   !for k=1 to $parmcnt
  119.     !if uservar!=$(vote_description[$k;2])
  120.       !if textarea=$(vote_description[$k;2])
  121.         <td style="max-width:100px;font-size:0.8em;">
  122.         !record $u of $votedir/$(vote)_$(k).comments
  123.       !else
  124.         <td>
  125.         !item $u of $(donvote_$k)
  126.       !endif
  127.       </td>
  128.     !endif
  129.   !next k
  130.   </tr>
  131. !next u
  132.  $table_end
  133. !endif
  134.  
  135. !goto end
  136.  
  137. :studentbyitem
  138. !if $wims_user=supervisor and $vote_option!=anonymous
  139.   <p> $name_details
  140.   !for i=1 to $parmcnt
  141.     !for c=1 to $(choices$i)
  142.       !if /supervisor/ notin $c/
  143.         <p>$i - $(vote_description[$i;$c+2]) <br />
  144.         <pre>
  145.         !for u in $(votes_$(i)_$c)
  146.           !if $vote_option=nominative
  147.             !!##
  148.            !set U=!translate internal / to , in $u
  149.             !set U1 = !replace internal , by / in $(U[1..-2])
  150.             !set U = !nospace $U1,$(U[-1])
  151.             !!       $U
  152.             !readproc adm/class/userdef classes,$U
  153.             !defof user_lastname, user_firstname in $userdef
  154.             ($u)
  155.           !else
  156.             ($u)
  157.           !endif
  158.         !next u
  159.         </pre>
  160.       !endif
  161.     !next c
  162.   !next i
  163. !endif
  164.  
  165. :end
  166. !set wims_menu_items=!append line back2 $vote,1,cmd=reply&job=read&vote=$vote to $wims_menu_items
  167.