Subversion Repositories wimsdev

Rev

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