<ul class="wims_subclasses">
!for typ in portal,group,level,class,course,program,test
  !set nstyle=wims_classes_direct_$typ
  !set ntype_=$typ
  !set ntype_ = !replace internal program by $(CL_Name[3]) in $ntype_
  !set ntype_ = !replace internal level by $(CL_Name[1])  in $ntype_
  !set ntype_ = !replace internal class by $(CL_Name[2])  in $ntype_
  !set ntype_ = !replace internal course by $(CL_Name[4]) in $ntype_
  !set ntype_ = !replace internal portal by $(CL_Name[6]) in $ntype_
  !set ntype_ = !replace internal group by $(CL_Name[6]) in $ntype_
  !set ntype_ = !replace internal test by $(CL_Name[7]) in $ntype_
  !for cl in $(direct$typ)
    !distribute words $cl into c_,u_
    !set n_=!defof class_institution, class_description in\
 wimshome/log/classes/$c_/.def
    !if $u_=supervisor
      !set t_=supervisor
      !if $c_ notwordof $wims_supervise and $wims_realuser!=$wims_user
        !goto out
      !endif
    !else
      !set t_=$type
    !endif
    <li>
    <span class="$nstyle">
    !set u__=$u_
    !if $auth_method isitemof $auth_method_list
      !if $u_ != supervisor
       !readproc adm/class/userdef classes,$c_,$u_
       !set u__=!defof user_external_auth in $userdef
      !endif
    !endif
    !href cmd=reply&type=auth$t_&class=$c_&auth_user=$u__ $n_
    ($u__)</span>
    </li>
    :out
    !reset c_ u_ t_
  !next cl
!next typ
 </ul>
