!read adm/title.phtml 1\
$classname\
$wims_name_teacherlist

!!don't work as it is
!!!if $teachercnt>0
!!<div class="wimscenter">
!!!href module=adm/class/userscore&job=csv $wims_name_csv
!!</div>
!!!endif

!set table_id=TABLE_teacher
!set table_class=sortable
$table_header
!if $wims_realuser=supervisor and $type_class=2
  <caption>
  !href module=adm/class/reguser&step=1&utype=1 $wims_name_addteacher
  </caption>
!endif
<thead>
$table_hdtr
<th scope="col">$wims_name_account</th>
<th scope="col">$wims_name_lastname</th>
<th scope="col">$wims_name_firstname</th>
<th scope="col">$name_mkclass</th>
<th scope="col">$name_gestion</th>
<th scope="col">$name_inscript</th>
!if $wims_realuser=supervisor or $wims_realuser=$class_Supervisor
  <th data-sort-method='none'>$wims_name_action</th></tr>
!endif
</thead>
<tbody>
!for i=1 to $teachercnt
  !set l=!line $i of $teacherlist
  !distribute items $l into tl_,tf_,tc_
  $table_tr
  <td><span class="tt wims_login">$tc_</span></td>
  <td>$tl_ </td>
  <td>$tf_ </td>
  !readproc adm/class/userdef classes,$wims_superclass,$tc_
  !set sup=!defof user_supervise\
user_participate\
user_mkclass in $userdef
  !reset userdef
  !distribute line $sup into sup,part,mk
  <td>
   !if $mk!=no
    &#x2705;
   !endif
  </td>
  !if $type_class=2
    !for l in sup,part
      <td>
      !if $($l)!=$empty
        !set nb=!itemcnt $($l)
        !let po=!positionof item $($l[1]) in $(ltclassname[;1])
        $(ltclassname[$po;2])
        !if $nb>1
          !for k=2 to $nb
            !let po=!positionof item $($l[$k]) in $(ltclassname[;1])
            ; $(ltclassname[$po;2])
          !next k
        !endif
      !endif
      </td>
    !next l
  !else
    !for l in sup,part
      <td>
      !if $wims_class isitemof $($l)
         &#x2705;
      !endif
      </td>
    !next l
  !endif
  !if $wims_realuser=supervisor or $wims_realuser=$class_Supervisor
    <td>
    !set wims_ref_class=wims_button
    !href cmd=reply&job=userprop&getuser=$tc_&oldjob=teacher $wims_name_change
    </td>
  !endif
 </tr>
!next i
</tbody>
$table_end
!read tablesort.phtml

!if $type_class=2 and $wims_realuser=supervisor
  !set wims_menu_items=!append line \
  addteacher,1, module=adm/class/reguser&step=1&utype=1\
to $wims_menu_items
!endif
!set wims_menu_items=!append line part_list,1,cmd=resume\
to $wims_menu_items
