Subversion Repositories wimsdev

Rev

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

  1. !if $user!=$empty
  2.   !readdef wimshome/log/classes/$wims_class/.users/$user
  3.   !distribute item $user_lastname,$user_firstname into lastname,firstname
  4. !endif
  5. !default name_student=!nosubst $lastname, $firstname
  6. !if $status!=OK
  7.   !form reply
  8.   <input type="hidden" name="job" value="select" />
  9.   <input type="hidden" name="status" value="OK" />
  10.   <fieldset class="property_fields halfwidth blockcenter">
  11.     <legend>$name_title
  12.   !if $user!=$empty
  13.     ($name_student)
  14.   !endif
  15.     </legend>
  16.    <div class="field box">
  17.       <label for="showsheet">$name_showsheet</label>
  18.       <br />
  19.   !set wims_formselect_switch=multiple size="$[min($activelist_cnt,10)]"
  20.   !formselect showsheet list $activlist prompt $(shs_title[$(activlist)])
  21.     </div>
  22.     <div class="wimscenter wimsform">
  23.       <input type="submit" value="$wims_name_Show" />
  24.     </div>
  25.   !read script/choix.phtml
  26.    </fieldset>
  27.   !formend
  28. !else
  29.   !if $usercnt==0
  30.     $name_noparticipant
  31.   !else
  32.     !default showsheet=$activlist
  33.     !default graphics=0
  34.     !if $graphics=1
  35.       !default choice=first
  36.       !if $choice=all
  37.         !set choice=first
  38.       !endif
  39.     !else
  40.       !if $choice!=login
  41.         !reset loginlist
  42.       !endif
  43.     !endif
  44.     !set nbth=4
  45.     !if $user=$empty
  46.       <p>$name_click</p>
  47.     !endif
  48.     !if $graphics!=1
  49.       !set table_id=TABLE_userlist
  50.       !set table_class=sortable
  51.     !endif
  52.     $table_header
  53.     <thead>
  54.     <tr>
  55.     <th colspan="5"></th>
  56.     !for j in $showsheet
  57.       !if $(activ[$j])>0
  58.         <th colspan="2" class="small">$wims_name_Sheet $j <br />$(shs_title[$j])<br />($(nbexo$j) $name_exo)</th>
  59.         !increase nbth
  60.         !increase nbth
  61.       !endif
  62.     !next j
  63.     </tr>
  64.     $table_hdtr
  65.     <th scope="col">$wims_name_lastname, $wims_name_firstname</th>
  66.     <th scope="col">$name_lastconnexion</th>
  67.     <th scope="col" data-sort-method="number">$name_nbsessions</th>
  68.     <th scope="col" class="small" data-sort-method="number">$wims_name_cnt_exo<br /> ($nbexototal $name_exo)</th>
  69.     <th>$name_total</th>
  70.     !for j in $showsheet
  71.       !if $(activ[$j])>0
  72.         <th class="small" scope="col" data-sort-method="number">$name_cnt_exo</th>
  73.         <th class="small" scope="col" data-sort-method="number">$name_time</th>
  74.       !endif
  75.     !next j
  76.     </tr>
  77.     </thead>
  78.     <tbody>
  79.     !!!no efficient !
  80.     !set nbpart=0
  81.     !for m=1 to $usercnt
  82.       !if $nbpart > $limitpart and $choice!=all
  83.         !break
  84.       !endif
  85.       !set uu=!record $m of wimshome/log/classes/$wims_class/.userlist
  86.       !distribute items $uu into lastname,firstname,uu
  87.       !if $choice=first and $m=1
  88.         !default user=$uu
  89.       !endif
  90.       !if $choice=all or ($choice=login and $uu isitemof $loginlist and $user=$empty) \
  91.           or ($choice=select and $uu isitemof $select_user)\
  92.         or $uu=$user\
  93.         or ($choice=filter and $varfilter_!=$empty)
  94.       !if $varfilter_!=$empty
  95.         !reset var_filter_test
  96.         !readproc adm/vfilter/testfilter $uu\
  97. $varfilter_
  98.         !if $var_filter_test!=1
  99.           !goto enduser
  100.         !endif
  101.       !endif
  102.       !set getraw=$uu
  103.       !increase nbpart
  104.       !readproc script/raw.proc
  105.       $table_tr
  106.       <td>
  107.       !href module=adm/class/userscore&job=getuser&getuser=$uu#sheet$(showsheet[1]) $name_student
  108.      </td>
  109.       !for h = 1 to 2*$sheetcnt + 4
  110.         !set h1=$[($h+$h%2)/2-2]
  111.         !if $h <=4 or ($h>4 and $(activ[$h1])>0) and $h1 isitemof $showsheet
  112.           !if $h>2 and . notin $[$h/2]
  113.             !if $(data[$h])!=$empty
  114.               !let tmp=!replace internal : by , in $(data[$h])
  115.               !let tmp=$[$(tmp[1])*3600+$(tmp[2])*60+$(tmp[3])]
  116.             !else
  117.               !let tmp=-1
  118.             !endif
  119.             <td data-sort="$tmp">$(data[$h])
  120.           !else
  121.             <td data-sort="$(data[$h])">$(data[$h])
  122.           !endif
  123.           !if $h=3 and $(data[$h])!=$empty and $(data[-1])>0
  124.             <span style="color:orange">+ $(data[-1])</span>
  125.           !endif
  126.           !set h2=$[$h%2]
  127.           !if $h1 isitemof $showsheet and $h2=1
  128.             !if , isin $showsheet
  129.               !set bb=!select $databyday where column 1=$h1
  130.             !else
  131.               !set bb=$(databyday[1;])
  132.             !endif
  133.             !if $bb!=$empty
  134.               !set bb=!exec pari vecsum($(bb[6]))
  135.               <span style="color:orange">+ $bb</span>
  136.             !endif
  137.           !endif
  138.           </td>
  139.         !endif
  140.       !next
  141.       </tr>
  142.       !if $graphics=1
  143.         $table_tr
  144.         <td colspan="$[$nbth+1]" style="text-align:left;">
  145.         !read script/exobyday.phtml
  146.         </td></tr>
  147.       !endif
  148.     !endif
  149.   :enduser
  150.   !next
  151.   </tbody>
  152.   $table_end
  153.   !read tablesort.phtml
  154. !endif
  155.  
  156. !if $user!=$empty and $choice!=all
  157.   !distribute item scores,livret1 into sc,li
  158.   !set parmuser1=&job=getuser&getuser=$user
  159.   !set parmuser2=&job=user&user=$user
  160. !else
  161.   !distribute item Score1,livret into sc,li
  162. !endif
  163. !set wims_menu_items=!append line itemsep,0,$wims_name_Evaluation $user\
  164. back2 $user,1,cmd=new&user=$user\
  165. $sc,1,module=adm/class/userscore&job_affi=notes$parmuser1\
  166. $li,1,module=adm/class/livret$parmuser2\
  167. to $wims_menu_items
  168. !if $choice!=all
  169.   !read adm/class/getnextuser $wims_class,$user,activity,user
  170. !endif
  171. :end
  172. !tail
  173.