Rev 4217 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
23 | reyssat | 1 | |
2 | parent=level |
||
3 | thiscode=$prog |
||
4 | !if $cancel!=$empty or $prog=$empty |
||
12616 | bpr | 5 | :back |
6 | job=first |
||
7 | !changeto jobs/$job.proc |
||
23 | reyssat | 8 | !endif |
9 | |||
10 | proghome=$classdir1/$prog |
||
11 | !readdef $proghome/.def |
||
12 | !if $class_defined!=yes |
||
12616 | bpr | 13 | !goto back |
23 | reyssat | 14 | !endif |
15 | |||
16 | level=!translate internal / to , in $prog |
||
17 | level=!item 1 to -2 of $level |
||
18 | level=!translate internal , to / in $level |
||
19 | level=!nospace $level |
||
20 | |||
21 | !if $confirm=$empty |
||
12616 | bpr | 22 | :normal |
23 | hastest=!defof class_defined in $proghome/0/.def |
||
24 | courses=!record 0 of $proghome/courses |
||
25 | courses=!nonempty lines $courses |
||
26 | coursecnt=!linecnt $courses |
||
27 | icourses=!record 0 of $proghome/icourses |
||
28 | icourses=!nonempty lines $icourses |
||
29 | icoursecnt=!linecnt $icourses |
||
30 | !distribute words $class_progstyle into progstyle1, progstyle2 |
||
31 | pass=$class_password |
||
32 | passs=!defof user_password in $proghome/supervisor |
||
33 | recsharable= |
||
34 | !if $class_recshare=$empty |
||
35 | others=!record 0 of $classdir1/programs |
||
36 | others=!select $others where ..$level/ notin ..column 1 |
||
37 | n=!linecnt $others |
||
38 | !for i=1 to $n |
||
39 | l=!line $i of $others |
||
40 | !distribute items $l into add,none,name,none |
||
41 | ready=!defof class_recshare in $classdir1/$add/.def |
||
42 | !if $ready=$empty or $ready=main |
||
43 | recsharable=!append line $add,$name to $recsharable |
||
44 | !endif |
||
45 | !next i |
||
46 | !endif |
||
47 | !exit |
||
23 | reyssat | 48 | !endif |
49 | |||
50 | title=!trim $title |
||
51 | title=!replace internal , by , in $title |
||
52 | !if $title=$empty |
||
53 | error=empty_data |
||
54 | !exit |
||
55 | !endif |
||
56 | |||
4217 | bpr | 57 | modclass_list=description,supervisor,Supervisor,progstyle,password,secure,email |
23 | reyssat | 58 | cadd_description=$title |
59 | cadd_Supervisor=$sup |
||
60 | cadd_progstyle=$progstyle1 $progstyle2 |
||
4217 | bpr | 61 | modclass_slist=password,email |
23 | reyssat | 62 | sadd_password=$passs |
63 | cadd_password=$pass |
||
64 | cadd_secure=$sechost |
||
65 | |||
66 | !read adm/gateway/modclass $prog |
||
67 | |||
68 | !if $error!=$empty |
||
12616 | bpr | 69 | !exit |
23 | reyssat | 70 | !endif |
71 | |||
72 | !read adm/gateway/mkindex |
||
73 | !reset confirm,title,sup,passs,pass |
||
74 | !readdef $proghome/.def |
||
75 | !goto normal |