!if $ccnt=0
  !if $parent=class
    $name_course1
  !else
    $name_course2
  !endif
  !href cmd=reply&job=$parent $wims_name_back2
  .
  !exit
!endif
!set table_id=TABLE_courselist
!set table_class=sortable

!if $parent=class
  $name_course3
  $table_header
  <thead>
  $table_hdtr<th scope="col">$wims_name_title</th><th scope="col">$wims_name_comment</th></tr>
  </thead>
  <tbody>
  !for p in $clist
    !set i_=!defof class_description in wimshome/log/classes/$p/.def
    $table_tr
    <td>
    !href cmd=reply&confirm=yes&courseclass=$class&courseprog=$p $i_
    </td><td>-</td></tr>
  !next p
  </tbody>
  $table_end
  !read tablesort.phtml
  !exit
!endif

!if $parent=prog
  $name_course4
  $table_header
  <thead>
  $table_hdtr<th scope="col">$wims_name_title</th>
  <th scope="col">$wims_name_comment</th></tr>
  </thead>
  <tbody>
  !for c in $clist
    !set i_=!defof class_description in wimshome/log/classes/$c/.def
    $table_tr
    <td>
    !href cmd=reply&confirm=yes&courseclass=$c&courseprog=$prog&cparent=$parent $i_
    </td><td>-</td></tr>
  !next c
  </tbody>
  $table_end
  !read tablesort.phtml
!endif
