Rev 16467 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 16467 | Rev 16558 | ||
---|---|---|---|
Line 8... | Line 8... | ||
8 | error=printversion |
8 | error=printversion |
9 | notallowed=1 |
9 | notallowed=1 |
10 | !exit |
10 | !exit |
11 | !endif |
11 | !endif |
12 | 12 | ||
13 | !! ----------- delete intro_sol>0 in iniparm |
13 | !! ----------- delete intro_sol>0 and intro_feed in iniparm |
14 | !if intro_expert isin $iniparm or intro_sol isin $iniparm |
- | |
15 | t=$ |
14 | t=$ |
16 | tmp=!replace internal & by $t in $iniparm |
15 | tmp=!replace internal & by $t in $iniparm |
- | 16 | !for type in sol,feed |
|
17 | !if |
17 | !if intro_$type isin $iniparm |
18 | tmp2=!getopt |
18 | tmp2=!getopt intro_$type in $tmp |
19 | !if $tmp2!=0 |
19 | !if $tmp2!=0 |
20 |
|
20 | ctmp=intro_$type=$tmp2 |
21 | iniparm=!replace internal $ctmp by |
21 | iniparm=!replace internal $ctmp by intro_$type=0 in $iniparm |
- | 22 | !endif |
|
- | 23 | !else |
|
- | 24 | iniparm=$iniparm&intro_$type=0 |
|
22 | !endif |
25 | !endif |
23 |
|
26 | !next type |
24 | iniparm=$iniparm&intro_sol=0 |
- | |
25 | !endif |
- | |
26 | !if intro_expert isin $iniparm |
27 | !if intro_expert isin $iniparm |
27 | tmp2=!getopt intro_expert in $tmp |
28 | tmp2=!getopt intro_expert in $tmp |
28 | !if $tmp2!=yes |
29 | !if $tmp2!=yes |
29 | ctmp=intro_expert=$tmp2 |
30 | ctmp=intro_expert=$tmp2 |
30 | iniparm=!replace internal $ctmp by intro_expert=yes in $iniparm |
31 | iniparm=!replace internal $ctmp by intro_expert=yes in $iniparm |
31 | !endif |
32 | !endif |
32 | !else |
33 | !else |
33 | iniparm=$iniparm&intro_expert=yes |
34 | iniparm=$iniparm&intro_expert=yes |
34 | !endif |
35 | !endif |
35 | !else |
- | |
36 | iniparm=$iniparm&intro_expert=yes&intro_sol=0 |
- | |
37 | !endif |
- | |
38 | !! --------- end |
36 | !! --------- end |
39 | 37 | ||
40 | !if $cmd=new or $cmd=resume |
38 | !if $cmd=new or $cmd=resume |
41 | freeworkslist=$empty |
39 | freeworkslist=$empty |
42 | !for i=1 to $nbfreework |
40 | !for i=1 to $nbfreework |
Line 65... | Line 63... | ||
65 | freeworkscnt=!linecnt $freeworkslist |
63 | freeworkscnt=!linecnt $freeworkslist |
66 | !endif |
64 | !endif |
67 | !ifval $freeworkscnt=0 |
65 | !ifval $freeworkscnt=0 |
68 | error=addexo-nofreework |
66 | error=addexo-nofreework |
69 | notallowed=1 |
67 | notallowed=1 |
70 | !exit |
68 | !exit |
71 | !endif |
69 | !endif |
72 | test_transl=!module translation_language $dir |
70 | test_transl=!module translation_language $dir |
73 | !if $lang iswordof $test_transl |
71 | !if $lang iswordof $test_transl |
74 | tr_lang=yes |
72 | tr_lang=yes |
75 | title=!module title_$lang $dir |
73 | title=!module title_$lang $dir |
76 | desc=!module description_$lang $dir |
74 | desc=!module description_$lang $dir |
Line 79... | Line 77... | ||
79 | 77 | ||
80 | desc=!lookup $get_exo in wimshome/public_html/modules/$dir/Descindex |
78 | desc=!lookup $get_exo in wimshome/public_html/modules/$dir/Descindex |
81 | obs=!lookup $get_exo in wimshome/public_html/modules/$dir/Obsindex |
79 | obs=!lookup $get_exo in wimshome/public_html/modules/$dir/Obsindex |
82 | !default title=!module title $dir |
80 | !default title=!module title $dir |
83 | !default desc=!module description $dir |
81 | !default desc=!module description $dir |
84 |
|
82 | module_cat=!module category $dir |
85 | !if exercise notin |
83 | !if exercise notin $module_cat and oef notin $module_cat |
86 | error=not_exo |
84 | error=not_exo |
87 | !exit |
85 | !exit |
88 | !endif |
86 | !endif |
89 | !exit |
87 | !exit |
90 | !endif |
88 | !endif |
91 | 89 | ||
92 | !if $cmd=reply |
90 | !if $cmd=reply |
93 | !if ../adm/ isin ../$dir or $dir=home or \ |
91 | !if ../adm/ isin ../$dir or $dir=home or \ |
Line 143... | Line 141... | ||
143 | test=$pickfreework |
141 | test=$pickfreework |
144 | error=already_exist |
142 | error=already_exist |
145 | !exit |
143 | !exit |
146 | !endif |
144 | !endif |
147 | !next i |
145 | !next i |
- | 146 | !if oef isin $module_cat |
|
- | 147 | copara=!listintersect $copara and solution,feedback |
|
- | 148 | !else |
|
- | 149 | !reset copara |
|
- | 150 | !endif |
|
148 | !appendfile wimshome/log/classes/$wims_class/freeworks/.Wfreework$pickfreework :$dir\ |
151 | !appendfile wimshome/log/classes/$wims_class/freeworks/.Wfreework$pickfreework :$dir\ |
149 | $iniparm\ |
152 | $iniparm\ |
150 | $ititle\ |
153 | $ititle\ |
151 |
|
154 | $idesc\ |
- | 155 | $copara |
|
152 | success=exo-insert |
156 | success=exo-insert |
153 | exocnt=!recordcnt wimshome/log/classes/$wims_class/freeworks/.Wfreework$pickfreework |
157 | exocnt=!recordcnt wimshome/log/classes/$wims_class/freeworks/.Wfreework$pickfreework |
154 | wims_module_log=class $class: add No$exocnt to freework $pickfreework |
158 | wims_module_log=class $class: add No$exocnt to freework $pickfreework |
155 | !endif |
159 | !endif |