Subversion Repositories wimsdev

Rev

Rev 4217 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed


parent=level
thiscode=$prog
!if $cancel!=$empty or $prog=$empty
  :back
  job=first
  !changeto jobs/$job.proc
!endif

proghome=$classdir1/$prog
!readdef $proghome/.def
!if $class_defined!=yes
  !goto back
!endif

level=!translate internal / to , in $prog
level=!item 1 to -2 of $level
level=!translate internal , to / in $level
level=!nospace $level

!if $confirm=$empty
  :normal
  hastest=!defof class_defined in $proghome/0/.def
  courses=!record 0 of $proghome/courses
  courses=!nonempty lines $courses
  coursecnt=!linecnt $courses
  icourses=!record 0 of $proghome/icourses
  icourses=!nonempty lines $icourses
  icoursecnt=!linecnt $icourses
  !distribute words $class_progstyle into progstyle1, progstyle2
  pass=$class_password
  passs=!defof user_password in $proghome/supervisor
  recsharable=
  !if $class_recshare=$empty
    others=!record 0 of $classdir1/programs
    others=!select $others where ..$level/ notin ..column 1
    n=!linecnt $others
    !for i=1 to $n
      l=!line $i of $others
      !distribute items $l into add,none,name,none
      ready=!defof class_recshare in $classdir1/$add/.def
      !if $ready=$empty or $ready=main
       recsharable=!append line $add,$name to $recsharable
      !endif
    !next i
    !endif
  !exit
!endif

title=!trim $title
title=!replace internal , by , in $title
!if $title=$empty
 error=empty_data
 !exit
!endif

modclass_list=description,supervisor,Supervisor,progstyle,password,secure,email
cadd_description=$title
cadd_Supervisor=$sup
cadd_progstyle=$progstyle1 $progstyle2
modclass_slist=password,email
sadd_password=$passs
cadd_password=$pass
cadd_secure=$sechost

!read adm/gateway/modclass $prog

!if $error!=$empty
  !exit
!endif

!read adm/gateway/mkindex
!reset confirm,title,sup,passs,pass
!readdef $proghome/.def
!goto normal