Subversion Repositories wimsdev

Rev

Rev 16192 | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. !! display list of participant with usual information
  2. !! work to do
  3. !!ATTENTION : il faut faire un tableau different en fonction du niveau de structure de la classe d'appel (portail, superclass, etc...) reflechir à ce que l'on affiche.
  4.  
  5. !read adm/title.phtml 1\
  6. $classname\
  7. $wims_name_part_list ($usercnt)
  8.  
  9. !readproc userlist.mkdata
  10.  
  11. !reset table_center
  12. !set typen=!defof class_typename in wimshome/log/classes/$wims_class/.def
  13. !if $usercnt=0
  14.   <div class="wimscenter">
  15.   $name_noyetparticipant
  16.   !if $typen!=level
  17.     $ $
  18.     !set wims_ref_class=wims_button
  19.     !href module=adm/class/reguser&step=1 $wims_name_addstudent
  20.     $ $
  21.   !endif
  22.   !!    20141016 : deconnecte pour l'instant, attente d'organisation.
  23.   !!    !set wims_ref_class=wims_button
  24.   !!    !href cmd=reply&job=csv $wims_name_csv
  25.   </div>
  26. !else
  27.   !! ------ manage ask for technical variable selection.
  28.   !if $tv_listtechvar!=$empty
  29.     !form reply
  30.     !read adm/vfilter/varfilter html
  31.     !formend
  32.   !endif
  33.   !! ----- displaying table of participant
  34.   !set table_id=TABLE_userlist
  35.   !set table_class=sortable
  36.   $table_header
  37.   <thead>
  38.   !if $nbtechvar>0
  39.     <tr>
  40.     !for k=1 to 6
  41.       <th></th>
  42.     !next k
  43.     <th colspan="$nbtechvar">$name_vars</th>
  44.     <th></th>
  45.     </tr>
  46.   !endif
  47.   $table_hdtr
  48.   <th scope="col">$name_studentglo</th>
  49.   !for k in $wims_name_Login,$wims_name_email,$name_regnum,$name_external_auth,$wims_name_lastconnect
  50.     <th scope="col">$k</th>
  51.   !next k
  52.   !if $nbtechvar>0
  53.     !for k in $(tv_listtechvar[;1])
  54.       <th scope="col">$k</th>
  55.     !next k
  56.   !endif
  57.   <th scope="col">$name_comments</th>
  58.     </tr>
  59.   </thead>
  60.   <tbody>
  61.   !set nbrec=!recordcnt $fileuserlist
  62.   !for i=1 to $nbrec
  63.     !set data=!record $i of $fileuserlist
  64.     !set uu=!item 2 of $data
  65.     !if $varfilter_!=$empty
  66.       !read adm/vfilter/testfilter $uu\
  67. $varfilter_
  68.     !endif
  69.     !if $(var_filter_test)=1 or $varfilter_=$empty
  70.       !!   !set UU=!hex $uu
  71.       !reset user_exists,user_email,user_regnum,user_external_auth,user_vars,user_comments$namecomment,user_comments
  72.       !readproc adm/class/userdef classes,$wims_class,$uu
  73.       !readdef $userdef
  74.       !readproc adm/vfilter/uservarfilter.proc $userdef
  75.       $table_tr
  76.       !reset css_connected
  77.       !if $uu isitemof $wims_connectedlogin
  78.         !set css_connected=class="wims_connected"
  79.         !set wims_ref_title=connected
  80.       !endif
  81.       <td $css_connected>
  82.         !href cmd=reply&+job=userprop&+getuser=$uu $(data[1])
  83.       </td>
  84.       <td>$(data[2])</td>
  85.       <td>
  86.         !if $wims_mail_hidden=yes
  87.           !if $(data[3])!=$empty
  88.             &#x2705;
  89.          !endif
  90.         !else
  91.           $(data[3])
  92.         !endif
  93.       </td>
  94.       <td>$(data[4])</td>
  95.       <td>$(data[5])</td>
  96.       <td data-sort="$(data[7])">$(data[6])</td>
  97.       !set data=!item 8 to -1 of $data
  98.       !set nbdata=!itemcnt $data
  99.       !if $nbdata=0
  100.         <td></td>
  101.       !else
  102.         !for val in $data
  103.           <td>$val</td>
  104.         !next val
  105.       !endif
  106.       </tr>
  107.     !endif
  108.   !next i
  109.    </tbody>
  110.   $table_end
  111.   !read tablesort.phtml
  112. !endif
  113.  
  114.  
  115. !! define wims_menu_items
  116. !set wims_menu_items=!append line itemsep,0,\
  117. csv,1,module=adm/class/userscore&job=csv\
  118. to $wims_menu_items
  119. !if $wims_typename iswordof group and $wims_supertype=2
  120.   !set wims_menu_items=!append line regmanage,1,module=adm/class/usermanage&job=regmanage to $wims_menu_items
  121. !endif
  122. !if $typen!=level
  123.   !set wims_menu_items=!append line addparticipant,1,module=adm/class/reguser&step=1\
  124. to $wims_menu_items
  125. !endif
  126. !if $deleted!=$empty
  127.   !set wims_menu_items=!append line recover,1,cmd=reply&job=recover\
  128. to $wims_menu_items
  129. !endif
  130.  
  131. !! menubox links -> teacher list
  132. !set class_Supervisor=!defof class_Supervisor in wimshome/log/classes/$wims_class/.def
  133. !!## supervisor can see list of teacher and their access
  134. !if supervisor=$wims_user and $wims_supertype=2
  135.   !default wims_superclass=$wims_class
  136.   !set teacherlist=!record 0 of wimshome/log/classes/$wims_superclass/.teacherlist
  137.   !set teachercnt=!linecnt $teacherlist
  138.   !if $teachercnt>0 and $job!=teacher
  139.     !set wims_menu_items=!append line itemsep,0,\
  140. teacherlist,1,module=adm/class/usermanage&job=teacher\
  141. to $wims_menu_items
  142.   !endif
  143.   !!## only the administrator has the right to add a teacher to the superclass
  144.  !if $wims_typename iswordof group and $wims_supertype=2
  145.     !if $teachercnt=0 or $job=teacher
  146.       !set wims_menu_items=!append line itemsep,0, to $wims_menu_items
  147.     !endif
  148.     !set wims_menu_items=!append line addteacher,1,module=adm/class/reguser&step=1&utype=1 to $wims_menu_items
  149.   !endif
  150. !endif wims_typename=group etc
  151.  
  152. !set wims_menu_items=!append line itemsep,0,$wims_name_classactivity\
  153. sendmail,1,module=adm/class/sendmail\
  154. photoboard,1,module=adm/class/photoboard\
  155. to $wims_menu_items
  156. !if $typen notwordof level portal program group class \
  157.     or ($wims_typename iswordof course or ($wims_typename iswordof class and $wims_supertype iswordof 0 2))
  158.   !set wims_menu_items=!append line itemsep,0,$wims_name_Evaluation\
  159. Score1,1,module=adm/class/userscore\
  160. livret,1,module=adm/class/livret\
  161. activity,1,module=adm/class/activity\
  162.   to $wims_menu_items
  163. !endif
  164.