Rev 15989 | Rev 16143 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1406 | bpr | 1 | |
3912 | bpr | 2 | !bound seq between integer 1 and $seq_cnt+1 default $empty |
1406 | bpr | 3 | |
4 | !if $cf_abandon!=$empty or $seq=$empty |
||
12335 | bpr | 5 | !reset cf_abandon |
6 | job=show |
||
7 | !exit |
||
1406 | bpr | 8 | !endif |
9 | |||
10 | !if $seq>$maxseq |
||
12335 | bpr | 11 | error=toomanyseq |
12 | !exit |
||
1406 | bpr | 13 | !endif |
14 | |||
15 | !if $cmd=reply |
||
15987 | guerimand | 16 | seq_desc=!replace internal $\ |
17 | $ by $ $ in $seq_desc |
||
15988 | guerimand | 18 | seq_title=!char 1 to $title_limit of $seq_title |
19 | seq_desc=!char 1 to $desc_limit of $seq_desc |
||
14049 | bpr | 20 | new_data=:$seq_title\ |
15998 | guerimand | 21 | $seq_desc |
22 | !! ---- check hidedate and showdate |
||
23 | today=!char 1 to 8 of $wims_now |
||
24 | thisyear=!char 1 to 4 of $today |
||
25 | !for k in hide,show |
||
26 | $(k)date=!text select char 0123456789 in $($(k)date) |
||
27 | expmon=!char 5 to 6 of $($(k)date) |
||
28 | expday=!char 7 to 8 of $($(k)date) |
||
29 | expyear=!char 1 to 4 of $($(k)date) |
||
30 | !if $expday<1 or $expday>31 or $expmon<1 or $expmon>12 \ |
||
31 | or $expyear<$thisyear or $expyear>$thisyear+1 \ |
||
32 | or $($(k)date)<$class_creation \ |
||
33 | or $($(k)date)>$class_expiration \ |
||
34 | or N isin $expmon$expday$expyear \ |
||
35 | or $($(k)date)<=$today |
||
36 | !reset $(k)date |
||
37 | !endif |
||
38 | !next k |
||
39 | |||
1406 | bpr | 40 | |
14049 | bpr | 41 | !set listdoc=!makelist doc_ i for i=1 to $docpubliccnt |
42 | !set listc=!filelist $wims_home/log/classes/$wims_class/doc |
||
43 | !set listc=!lines2items $listc |
||
44 | !set listc=!replace internal c by c_$ $ in $listc |
||
45 | !set listexam=!makelist exam_ i for i=1 to $examcnt |
||
46 | !set listsheet=!makelist sheet_ i for i=1 to $sheetcnt |
||
47 | !set listvote=!makelist vote_ i for i=1 to $votecnt |
||
48 | !set listtool=!makelist tool_ i for i=1 to $toolcnt |
||
49 | !set listglossary=!makelist glossary_ i for i=1 to $glossarycnt |
||
14769 | guerimand | 50 | !set listfreework=!makelist freework_ i for i=1 to $freeworkcnt |
51 | list=!nospace $listc,$listdoc,$listsheet,$listexam,$listvote,$listtool,$listglossary,$listfreework |
||
14049 | bpr | 52 | list=!nonempty items $list |
53 | list1=debut |
||
54 | !for x in $list |
||
55 | list1=!append item $($x) to $list1 |
||
56 | !next |
||
57 | list1=$(list1[2..-1]) |
||
58 | listcnt=!replace internal ,0, by , in ,$list1, |
||
59 | listcnt=!nonempty items $listcnt |
||
60 | listcnt=!itemcnt $listcnt |
||
61 | !for j = 1 to $listcnt |
||
62 | jj=!positionof item $j in $list1 |
||
63 | !if $jj!= |
||
64 | listfinal=!append item $(list[$jj]) to $listfinal |
||
65 | !endif |
||
14769 | guerimand | 66 | !next j |
14049 | bpr | 67 | list=!replace internal _ by $ $ in $(listfinal) |
68 | new_data=!append line $list to $new_data |
||
15989 | guerimand | 69 | !bound visible within 0,1 default 0 |
14049 | bpr | 70 | !writefile wimshome/log/classes/$wims_class/seq/.sequence$seq $new_data\ |
15998 | guerimand | 71 | $visible\ |
72 | $hidedate\ |
||
73 | $showdate |
||
1406 | bpr | 74 | |
14049 | bpr | 75 | s_ =!record 0 of .sequences |
76 | s_=!line 2 to -1 of s_ |
||
77 | !if $seq= $[$seq_cnt+1] |
||
78 | seq_cnt=$[$seq_cnt+1] |
||
79 | !writefile wimshome/log/classes/$wims_class/seq/.sequences $seq_cnt\ |
||
80 | $s_ |
||
81 | !endif |
||
1406 | bpr | 82 | !endif |