Rev 16158 | Rev 16225 | 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 |
16143 | guerimand | 3 | jquery_defined=!defof jquery_defined in themes/$wims_theme/header.phtml |
1406 | bpr | 4 | |
5 | !if $cf_abandon!=$empty or $seq=$empty |
||
12335 | bpr | 6 | !reset cf_abandon |
7 | job=show |
||
8 | !exit |
||
1406 | bpr | 9 | !endif |
10 | |||
11 | !if $seq>$maxseq |
||
12335 | bpr | 12 | error=toomanyseq |
13 | !exit |
||
1406 | bpr | 14 | !endif |
15 | |||
16143 | guerimand | 16 | !readproc adm/vfilter/listvarfilter.proc |
17 | |||
16158 | guerimand | 18 | !if $save!=$empty or ($old_allowtype!=$allowtype and ($allowtype=techvar and $old_allowtechvar!=$allowtechvar)) |
15987 | guerimand | 19 | seq_desc=!replace internal $\ |
20 | $ by $ $ in $seq_desc |
||
15988 | guerimand | 21 | seq_title=!char 1 to $title_limit of $seq_title |
22 | seq_desc=!char 1 to $desc_limit of $seq_desc |
||
14049 | bpr | 23 | new_data=:$seq_title\ |
15998 | guerimand | 24 | $seq_desc |
16143 | guerimand | 25 | !! ------ manage of allow |
16154 | guerimand | 26 | !if $tv_listname=$empty |
27 | !bound allowtype within all,none,select default all |
||
28 | !else |
||
29 | !bound allowtype within all,none,select,techvar default all |
||
30 | !endif |
||
31 | !read adm/scorerestriction get |
||
32 | IPlist=$_output |
||
33 | IPlist=!translate ,;\ |
||
16143 | guerimand | 34 | * to $ $ in $IPlist |
16154 | guerimand | 35 | IPlist=!trim $IPlist |
36 | !if $allowtype=select and $IPlist=$empty and $save!=$empty |
||
16143 | guerimand | 37 | allowtype=all |
16154 | guerimand | 38 | !endif |
39 | !if $allowtype=all |
||
16143 | guerimand | 40 | allow_parm= |
16154 | guerimand | 41 | !endif |
42 | !if $allowtype=none |
||
16143 | guerimand | 43 | allow_parm=none |
16154 | guerimand | 44 | !endif |
45 | !if $allowtype=select |
||
16143 | guerimand | 46 | allow_parm=$IPlist |
16154 | guerimand | 47 | !endif |
16143 | guerimand | 48 | old_allowtype=$allowtype |
49 | old_allowtechvar=$allowtechvar |
||
16153 | guerimand | 50 | !if $allowtype=techvar |
51 | !readproc adm/vfilter/shexselect.proc .S$seq |
||
52 | !endif |
||
16143 | guerimand | 53 | !! ---- save modification of allow parameters for sequence |
54 | !if $sharers!=$empty and $allowshare=1 |
||
55 | setclass=!items2words $wims_class,$sharers |
||
56 | setclass=!words2items $setclass |
||
57 | !else |
||
58 | setclass=$wims_class |
||
59 | !endif |
||
60 | !if $allow_parm=$empty |
||
61 | !sh for c in $setclass; do rm -f $wims_home/log/classes/$$c/.S$seq; done |
||
62 | !else |
||
63 | !for c in $setclass |
||
64 | !writefile wimshome/log/classes/$c/.S$seq $allow_parm |
||
65 | !next c |
||
66 | !endif |
||
67 | wims_class_log=sequence $seq allow $allowtype $allowshare by $wims_realuser |
||
68 | !! ---- end of saving |
||
69 | !! -------- end manage of allow |
||
14049 | bpr | 70 | !set listdoc=!makelist doc_ i for i=1 to $docpubliccnt |
71 | !set listc=!filelist $wims_home/log/classes/$wims_class/doc |
||
72 | !set listc=!lines2items $listc |
||
73 | !set listc=!replace internal c by c_$ $ in $listc |
||
74 | !set listexam=!makelist exam_ i for i=1 to $examcnt |
||
75 | !set listsheet=!makelist sheet_ i for i=1 to $sheetcnt |
||
76 | !set listvote=!makelist vote_ i for i=1 to $votecnt |
||
77 | !set listtool=!makelist tool_ i for i=1 to $toolcnt |
||
78 | !set listglossary=!makelist glossary_ i for i=1 to $glossarycnt |
||
14769 | guerimand | 79 | !set listfreework=!makelist freework_ i for i=1 to $freeworkcnt |
80 | list=!nospace $listc,$listdoc,$listsheet,$listexam,$listvote,$listtool,$listglossary,$listfreework |
||
14049 | bpr | 81 | list=!nonempty items $list |
82 | list1=debut |
||
83 | !for x in $list |
||
84 | list1=!append item $($x) to $list1 |
||
85 | !next |
||
86 | list1=$(list1[2..-1]) |
||
87 | listcnt=!replace internal ,0, by , in ,$list1, |
||
88 | listcnt=!nonempty items $listcnt |
||
89 | listcnt=!itemcnt $listcnt |
||
90 | !for j = 1 to $listcnt |
||
91 | jj=!positionof item $j in $list1 |
||
92 | !if $jj!= |
||
93 | listfinal=!append item $(list[$jj]) to $listfinal |
||
94 | !endif |
||
14769 | guerimand | 95 | !next j |
14049 | bpr | 96 | list=!replace internal _ by $ $ in $(listfinal) |
97 | new_data=!append line $list to $new_data |
||
15989 | guerimand | 98 | !bound visible within 0,1 default 0 |
14049 | bpr | 99 | !writefile wimshome/log/classes/$wims_class/seq/.sequence$seq $new_data\ |
16223 | guerimand | 100 | \ |
16143 | guerimand | 101 | $visible |
1406 | bpr | 102 | |
14049 | bpr | 103 | s_ =!record 0 of .sequences |
104 | s_=!line 2 to -1 of s_ |
||
105 | !if $seq= $[$seq_cnt+1] |
||
106 | seq_cnt=$[$seq_cnt+1] |
||
107 | !writefile wimshome/log/classes/$wims_class/seq/.sequences $seq_cnt\ |
||
108 | $s_ |
||
109 | !endif |
||
1406 | bpr | 110 | !endif |
16143 | guerimand | 111 | |
16154 | guerimand | 112 | !! --- read saving configuration for allow parameters |
113 | !readproc adm/vfilter/shexread.proc S$seq |
||
114 | !! to distribute IPlist content into variable |
||
115 | !read adm/scorerestriction put\ |
||
16143 | guerimand | 116 | $IPlist |
117 | old_allowtype=$allowtype |
||
118 | old_allowtechvar=$allowtechvar |
||
16153 | guerimand | 119 | !reset save |
16143 | guerimand | 120 | !! --- end of reading |
121 |