Subversion Repositories wimsdev

Rev

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