Subversion Repositories wimsdev

Rev

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

  1. !distribute items exams/.exam, sheets/.sheet, 4, 3, 3, 5\
  2.         into file_E, file_S, line_E, line_S, linei_E, linei_S
  3.  
  4. !for ss in $listsh
  5.  !distribute items 0,0,0,0,0,0,0,0,0,0 into\
  6.         sreq, sweight, scid, snewcnt, ssccnt, sscsum, sdursum, sdur
  7.  !set sn=!char 2 to -1 of $ss
  8.  !set st=!char 1 of $ss
  9.  !set l_=!record $sn of wimshome/log/classes/$wims_class/$(file_$st)s
  10.  !set shtit=!line $(line_$st) of $l_
  11.  !set table_id=TABLE_$ss
  12.  !set table_class=sortable
  13.  $table_header
  14.  <thead>
  15.     !if $hdrow=1
  16.       $table_hdtr
  17.       <th scope="col">$wims_name_Exercise</th>
  18.       !if req isitemof $show and $st=S
  19.         <th scope="col" class="small" data-sort-method="number">$name_required_points</th>
  20.       !endif
  21.       !if weight isitemof $show
  22.         <th scope="col" class="small" data-sort-method="number">$name_coeff</th>
  23.       !endif
  24.       !if cid isitemof $show
  25.         <th scope="col" class="small" data-sort-method="number">$name_index</th>
  26.       !endif
  27.       </tr>
  28.     !else
  29.       $table_hdtr    
  30.         <th></th>
  31.         !if req isitemof $show and $st=S
  32.           <th></th>
  33.         !endif
  34.         !if weight isitemof $show
  35.           <th></th>
  36.         !endif
  37.         !if cid isitemof $show
  38.           <th></th>
  39.         !endif
  40.         !if tot isitemof $show
  41.           <th colspan="4">$name_totals</th>
  42.         !endif
  43.         !if scoremean isitemof $show
  44.           <th colspan="2" class="small">$name_avg_score</th>
  45.         !endif
  46.         !if partmean isitemof $show
  47.           <th colspan="4" class="small">$name_avg_participant</th>
  48.         !endif
  49.         !if minmax isitemof $show
  50.           <th colspan="2">$name_min</th>
  51.           <th colspan="2">$name_max</th>
  52.         !endif
  53.         !if deviat isitemof $show
  54.           <th colspan="2">$name_deviation</th>
  55.         !endif
  56.       </tr>
  57.       $table_hdtr    
  58.         <th scope="col">$wims_name_Exercise</th>
  59.         !if req isitemof $show and $st=S
  60.           <th scope="col" class="small" data-sort-method="number">$name_required_points</th>
  61.         !endif
  62.         !if weight isitemof $show
  63.           <th scope="col" class="small" data-sort-method="number">$name_coeff</th>
  64.         !endif
  65.         !if cid isitemof $show
  66.           <th scope="col" class="small" data-sort-method="number" >$name_index</th>
  67.         !endif
  68.         !if tot isitemof $show
  69.           <th scope="col" class="small" data-sort-method="number">$name_new</th>
  70.           <th scope="col" class="small" data-sort-method="number">$name_score</th>
  71.           <th scope="col" class="small" data-sort-method="number">$name_points</th>
  72.           <th scope="col" class="small" data-sort-method="number">$name_duration</th>
  73.         !endif
  74.         !if scoremean isitemof $show
  75.           <th scope="col" class="small" data-sort-method="number">$name_points</th>
  76.           <th scope="col" class="small" data-sort-method="number">$name_duration</th>
  77.         !endif
  78.         !if partmean isitemof $show
  79.           <th scope="col" class="small" data-sort-method="number">$name_new</th>
  80.           <th scope="col" class="small" data-sort-method="number">$name_score</th>
  81.           <th scope="col" class="small" data-sort-method="number">$name_points</th>
  82.           <th scope="col" class="small" data-sort-method="number">$name_duration</th>
  83.         !endif
  84.         !if minmax isitemof $show
  85.           <th scope="col" class="small" data-sort-method="number">$name_points</th>
  86.           <th scope="col" class="small" data-sort-method="number">$name_duration</th>
  87.           <th scope="col" class="small" data-sort-method="number">$name_points</th>
  88.           <th scope="col" class="small" data-sort-method="number">$name_duration</th>
  89.         !endif
  90.         !if deviat isitemof $show
  91.           <th scope="col" class="small" data-sort-method="number">$name_points</th>
  92.           <th scope="col" class="small" data-sort-method="number">$name_duration</th>
  93.         !endif
  94.       </tr>
  95.    !endif
  96.  </thead>
  97.  <tbody>
  98.  !for i=$(start$st$sn) to $(end$st$sn)
  99.   !set l_=!record $i of wimshome/log/classes/$wims_class/exostat
  100.   !distribute words $l_ into $fields
  101.   !set l_=!record $exo of wimshome/log/classes/$wims_class/$(file_$st)$sn
  102.   !if $l_=$empty
  103.    !goto next
  104.   !endif
  105.   !distribute lines $l_ into 1_,2_,3_,4_,5_,6_
  106.   !set t_=$($(linei_$st)_)
  107.   !if $scavg>0 and $st=S
  108.    !set sdur=$[$sdur+$duravg*$3_/$scavg]
  109.   !endif
  110.   $table_tr<td class="small">$exo.
  111.   !if $st=S
  112.    !href target=wims_exo module=$1_&cmd=new&worksheet=$sn&$2_ $t_
  113.   !else
  114.    $t_
  115.   !endif
  116.   </td>
  117.   !if req isitemof $show and $st=S
  118.    <td>$3_</td>
  119.    !set sreq=$[$sreq+$3_]
  120.   !endif
  121.   !if weight isitemof $show
  122.    !if $st=S
  123.     <td>$4_</td>
  124.     !set sweight=$[$sweight+$4_]
  125.    !else
  126.     <td>$1_</td>
  127.    !endif
  128.   !endif
  129.   !if cid isitemof $show
  130.    <td>$cid</td>
  131.    !set scid=$[$scid+$cid*($3_/10)]
  132.   !endif
  133.   !distribute item $[$snewcnt+$newcnt],$[$ssccnt+$sccnt],\
  134.      $[$sscsum+$scsum],$[$sdursum+$dursum] into\
  135.      snewcnt,ssccnt,sscsum,sdursum
  136.   !if tot isitemof $show
  137.    <td style="text-align:right">$newcnt</td>
  138.    <td style="text-align:right">$sccnt</td>
  139.    <td style="text-align:right">$scsum</td>
  140.    <td style="text-align:right">$dursum</td>
  141.   !endif
  142.   !if scoremean isitemof $show
  143.    <td>$[rint(10*$scavg)/10]</td>
  144.    <td>$[rint(10*$duravg)/10]</td>
  145.   !endif
  146.   !if partmean isitemof $show
  147.    <td>$[rint(10*$newcnt/$usercnt)/10]</td>
  148.    <td>$[rint(10*$sccnt/$usercnt)/10]</td>
  149.    <td>$[rint(10*$scsum/$usercnt)/10]</td>
  150.    <td>$[rint(10*$dursum/$usercnt)/10]</td>
  151.   !endif
  152.   !if minmax isitemof $show
  153.    <td style="text-align:right">$scmin</td>
  154.    <td style="text-align:right">$durmin</td>
  155.    <td style="text-align:right">$scmax</td>
  156.    <td style="text-align:right">$durmax</td>
  157.   !endif
  158.   !if deviat isitemof $show
  159.    <td style="text-align:right">$scdev</td>
  160.    <td style="text-align:right">$durdev</td>
  161.   !endif
  162.   :next
  163. </tr>
  164.  !next i
  165. </tbody>
  166.  !set test=!listintersect $show and req,weight,cid,tot,scoremean,partmean
  167.  !if $st=S and $(start$st$sn)<$(end$st$sn) and $test!=$empty
  168.   <tfoot>$table_hdtr<th scope="row">$name_sum</th>
  169.   !if req isitemof $show
  170.    <td>$sreq</td>
  171.   !endif
  172.   !if weight isitemof $show
  173.    <td>$sweight</td>
  174.   !endif
  175.   !if cid isitemof $show
  176.    <td>$scid</td>
  177.   !endif
  178.   !if tot isitemof $show
  179.    <td style="text-align:right">$snewcnt</td>
  180.    <td style="text-align:right">$ssccnt</td>
  181.    <td style="text-align:right">$sscsum</td>
  182.    <td style="text-align:right">$sdursum</td>
  183.   !endif
  184.   !if scoremean isitemof $show
  185.    <td>-</td>
  186.    <td>-</td>
  187.   !endif
  188.   !if partmean isitemof $show
  189.    <td>$[rint(10*$snewcnt/$usercnt)/10]</td>
  190.    <td>$[rint(10*$ssccnt/$usercnt)/10]</td>
  191.    <td>$[rint(10*$sscsum/$usercnt)/10]</td>
  192.    <td>$[rint(10*$sdursum/$usercnt)/10]</td>
  193.   !endif
  194.   !if minmax isitemof $show
  195.    <td>-</td>
  196.    <td>-</td>
  197.    <td>-</td>
  198.    <td>-</td>
  199.   !endif
  200.   !if deviat isitemof $show
  201.    <td>-</td>
  202.    <td>-</td>
  203.   !endif
  204.   </tr></tfoot>
  205.  !endif
  206.  
  207.  <caption>
  208.  <b>$(name_$st) $sn.</b> $shtit
  209.  <span class="small">($name_theoric $[rint($sdur)] $name_minute)</span>
  210.  </caption>
  211.  $table_end
  212.  !read tablesort.phtml
  213. !next ss
  214.  
  215.  
  216.