Subversion Repositories wimsdev

Rev

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


!if $job=first
  this=$wims_superclass
!else
  icourse=$course
  this=$wims_superclass/$($job)
!endif
teacherlist=!record 0 of $classdir1/.teacherlist
teachercnt=!linecnt $teacherlist
!reset list1 list2 prompt
cnt1=0
cnt2=0

!if $teachercnt<=0
  !exit
!endif

!if $more!=$empty
  !! ??? Why ???
  !if $wims_class/ notin $this/
    progtest=!defof sharing_exam in wimshome/log/classes/$this/neighbors
    !if $wims_class!=$progtest
      check=no
    !endif
  !endif
  !if $check!=no
    !for more_ in $more
      check_=!defof user_supervisable in $classdir1/.users/$more_
      !if $check_=yes
        supervise=!defof user_supervise in $classdir1/.users/$more_
        !if $actype=del
         sup2=!listcomplement $this in $supervise
        !endif
        !if $actype=add
          sup2=!listunion $supervise and $this
        !endif
        !if $sup2!=$supervise
          !setdef !set user_supervise=$sup2 in $classdir1/.users/$more_
        !endif
      !endif
    !next
    !read adm/gateway/mkteacherlist
    !reset more
  !endif
!endif

main=!defof class_Supervisor in wimshome/log/classes/$this/.def

!for i=1 to $teachercnt
  l=!line $i of $teacherlist
  !distribute items $l into last,first,l
  !if $l!=$main
    supervise=!defof user_supervise in $classdir1/.users/$l
    !if $this isitemof $supervise
      list1=!append item $i to $list1
    !else
      list2=!append item $l to $list2
      prompt=!append item $first $last (<span class="tt">$l</span>) to $prompt
    !endif
  !endif
!next i
cnt1=!itemcnt $list1
cnt2=!itemcnt $list2