!if $wims_supertype=4
 <div class="wims_work_legend">
  <p class="inline">$wims_name_legend</p>
  <ul class="inline">
  !set tmp=level,class,program,course
  !if $supervisable=yes or $wims_user=supervisor
    !set wims_name_testclass=$CL_Test
    !if $class_typename=program
      !set tmp=$(tmp[3,4]),testclass
    !endif
    !if $class_typename=class
      !set tmp=$(tmp[2,3,4])
    !endif
    !if $class_typename=course
      !set tmp=$(tmp[3])
    !endif
  !else
    !set tmp=$(tmp[1,2,4])
    !if $class_typename=class
      !set tmp=$(tmp[2,3])
    !endif
  !endif
  !for t in $tmp
    <li class="wims_classes_direct_$t">$(wims_name_$t)</li>
  !next
  </ul>
 </div>
!endif
