Rev 12520 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 12520 | Rev 14218 | ||
---|---|---|---|
Line 8... | Line 8... | ||
8 | !if robot isin $session |
8 | !if robot isin $session |
9 | !exit |
9 | !exit |
10 | !endif |
10 | !endif |
11 | 11 | ||
12 | !readproc auth |
12 | !readproc auth |
13 |
|
13 | !if $wims_developer=$empty |
14 |
|
14 | !exit |
15 |
|
15 | !endif |
16 | sesdir=!translate internal _ to $ $ in $wims_sesdir |
16 | sesdir=!translate internal _ to $ $ in $wims_sesdir |
17 | sesdir=!word 1 of $sesdir |
17 | sesdir=!word 1 of $sesdir |
18 | !default author=!words2items $wims_name |
18 | !default author=!words2items $wims_name |
19 | author=!nonempty items $author |
19 | author=!nonempty items $author |
20 | !default email=$wims_devemail |
20 | !default email=$wims_devemail |
21 | !if $cmd iswordof reply new resume renew |
21 | !if $cmd iswordof reply new resume renew |
22 |
|
22 | error= |
23 |
|
23 | dossier=type |
24 |
|
24 | !if $example=0 or $example= |
25 |
|
25 | !if $debut=1 |
26 |
|
26 | !reset mtype N M source |
27 |
|
27 | compute=no |
28 |
|
28 | !else |
29 |
|
29 | !for a in title,author,email,file,source |
30 |
|
30 | !if $($a)=$empty |
31 |
|
31 | error= $error $a |
32 |
|
32 | !endif |
33 |
|
33 | !next |
34 |
|
34 | compute=yes |
35 |
|
35 | !endif |
36 |
|
36 | !else |
37 |
|
37 | !for a in type_exo,title,author,email,file,N,MAX1,M,try,\ |
38 | instruction,instruction2,answer_given,alea,choice,format,format0,\ |
38 | instruction,instruction2,answer_given,alea,choice,format,format0,\ |
39 | percent,pos_rep,common,second_step,first_step,\ |
39 | percent,pos_rep,common,second_step,first_step,\ |
40 | file, reading_file, audio_file,image_file,video_file,size,source,\ |
40 | file, reading_file, audio_file,image_file,video_file,size,source,\ |
41 | style_question,style_reponse,style_oef,style_css,\ |
41 | style_question,style_reponse,style_oef,style_css,\ |
42 | reading_tag,image_tag,video_tag,qcm_prompt1,qcm_prompt2,\ |
42 | reading_tag,image_tag,video_tag,qcm_prompt1,qcm_prompt2,\ |
43 | sens,aucune,raw,partialscore,paste,specialhelp1,specialhelp2,\ |
43 | sens,aucune,raw,partialscore,paste,specialhelp1,specialhelp2,\ |
44 | specialhelp3,specialhelp4,helpprompt,reaccent,packs,player,player_option,\ |
44 | specialhelp3,specialhelp4,helpprompt,reaccent,packs,player,player_option,\ |
45 | good_answer_text,bad_answer_text,incomplete_answer_text,\ |
45 | good_answer_text,bad_answer_text,incomplete_answer_text,\ |
46 | 46 | ||
47 |
|
47 | $(a) =!getdef $a in $example_dir/$TYPE/$example |
48 | !next |
- | |
49 | !if $type_exo iswordof CORRESP |
- | |
50 | taille_corr=$size |
- | |
51 | !endif |
- | |
52 | !if $type_exo iswordof ORDONNE \ |
- | |
53 | or ($type_exo iswordof SELECTWORD SELECTWORDA GAP and ($format iswordof dragfill clickfill)) |
- | |
54 | taille_drag=$size |
- | |
55 | !endif |
- | |
56 | !if $type_exo iswordof SELECTWORD SELECTWORDA GAP and $format=case |
- | |
57 | taille_case=$size |
- | |
58 | !endif |
- | |
59 | !if $type_exo iswordof COMPOSE |
- | |
60 | taille_compose=$size |
- | |
61 | !endif |
- | |
62 | - | ||
63 | !if $type_exo iswordof TRUEFALSE |
- | |
64 | choice_tf=$choice |
- | |
65 | !endif |
- | |
66 | !if $type_exo iswordof GAP |
- | |
67 | choice_gap=$choice |
- | |
68 | !endif |
- | |
69 | !if $type_exo iswordof QUIFAITQUOI |
- | |
70 | choice_qq=$choice |
- | |
71 | !endif |
- | |
72 | !if $type_exo iswordof QCMIII |
- | |
73 | choice_fd=$choice |
- | |
74 | !endif |
- | |
75 | - | ||
76 | !for a in reading,audio,image,video |
- | |
77 | !if $($(a)_file) notsametext no and $($(a)_file)!=$empty |
- | |
78 | $(a)_file0=$($(a)_file) |
- | |
79 | $(a)_file1=yes |
- | |
80 | !else |
- | |
81 | $(a)_file1=no |
- | |
82 | !endif |
- | |
83 |
|
48 | !next |
84 | compute=no |
- | |
85 | example= |
- | |
86 | - | ||
87 | !endif example |
- | |
88 | !readproc values |
- | |
89 | !if $N issametext all |
- | |
90 | N=\cnt_question |
- | |
91 | !endif |
- | |
92 | !if $MAX1 issametext all or $MAX1= |
- | |
93 | MAX = \cnt_question |
- | |
94 | !else |
- | |
95 | MAX=$MAX1 |
- | |
96 | !endif |
- | |
97 | !if $type_exo iswordof CORRESP |
49 | !if $type_exo iswordof CORRESP |
98 |
|
50 | taille_corr=$size |
99 | !endif |
51 | !endif |
100 | !if $type_exo iswordof ORDONNE \ |
52 | !if $type_exo iswordof ORDONNE \ |
101 | or ($type_exo iswordof SELECTWORD SELECTWORDA GAP and ($format iswordof dragfill clickfill)) |
53 | or ($type_exo iswordof SELECTWORD SELECTWORDA GAP and ($format iswordof dragfill clickfill)) |
102 |
|
54 | taille_drag=$size |
103 | !endif |
55 | !endif |
104 | !if $type_exo iswordof SELECTWORD SELECTWORDA GAP and $format=case |
56 | !if $type_exo iswordof SELECTWORD SELECTWORDA GAP and $format=case |
105 |
|
57 | taille_case=$size |
106 | !endif |
58 | !endif |
107 | !if $type_exo iswordof COMPOSE |
59 | !if $type_exo iswordof COMPOSE |
108 |
|
60 | taille_compose=$size |
109 | !endif |
61 | !endif |
110 | 62 | ||
111 | !if $type_exo iswordof TRUEFALSE |
63 | !if $type_exo iswordof TRUEFALSE |
112 |
|
64 | choice_tf=$choice |
113 | !endif |
65 | !endif |
114 | !if $type_exo iswordof GAP |
66 | !if $type_exo iswordof GAP |
115 |
|
67 | choice_gap=$choice |
116 | !endif |
68 | !endif |
117 | !if $type_exo iswordof QUIFAITQUOI |
69 | !if $type_exo iswordof QUIFAITQUOI |
118 |
|
70 | choice_qq=$choice |
119 | !endif |
71 | !endif |
120 | !if $type_exo iswordof QCMIII |
72 | !if $type_exo iswordof QCMIII |
121 |
|
73 | choice_fd=$choice |
122 | !endif |
74 | !endif |
- | 75 | ||
- | 76 | !for a in reading,audio,image,video |
|
- | 77 | !if $($(a)_file) notsametext no and $($(a)_file)!=$empty |
|
- | 78 | $(a)_file0=$($(a)_file) |
|
- | 79 | $(a)_file1=yes |
|
- | 80 | !else |
|
- | 81 | $(a)_file1=no |
|
- | 82 | !endif |
|
- | 83 | !next |
|
- | 84 | compute=no |
|
- | 85 | example= |
|
- | 86 | ||
- | 87 | !endif example |
|
- | 88 | !readproc values |
|
- | 89 | !if $N issametext all |
|
- | 90 | N=\cnt_question |
|
- | 91 | !endif |
|
- | 92 | !if $MAX1 issametext all or $MAX1= |
|
- | 93 | MAX = \cnt_question |
|
- | 94 | !else |
|
- | 95 | MAX=$MAX1 |
|
- | 96 | !endif |
|
- | 97 | !if $type_exo iswordof CORRESP |
|
- | 98 | size=$taille_corr |
|
- | 99 | !endif |
|
- | 100 | !if $type_exo iswordof ORDONNE \ |
|
- | 101 | or ($type_exo iswordof SELECTWORD SELECTWORDA GAP and ($format iswordof dragfill clickfill)) |
|
- | 102 | size=$taille_drag |
|
- | 103 | !endif |
|
- | 104 | !if $type_exo iswordof SELECTWORD SELECTWORDA GAP and $format=case |
|
- | 105 | size=$taille_case |
|
- | 106 | !endif |
|
- | 107 | !if $type_exo iswordof COMPOSE |
|
- | 108 | size=$taille_compose |
|
- | 109 | !endif |
|
- | 110 | ||
- | 111 | !if $type_exo iswordof TRUEFALSE |
|
- | 112 | choice=$choice_tf |
|
- | 113 | !endif |
|
- | 114 | !if $type_exo iswordof GAP |
|
- | 115 | choice=$choice_gap |
|
- | 116 | !endif |
|
- | 117 | !if $type_exo iswordof QUIFAITQUOI |
|
- | 118 | choice=$taille_qq |
|
- | 119 | !endif |
|
- | 120 | !if $type_exo iswordof QCMIII |
|
- | 121 | choice=$choice_fd |
|
- | 122 | !endif |
|
123 | 123 | ||
124 |
|
124 | liste = |
125 |
|
125 | !for a in reading, audio, image, video |
126 |
|
126 | !if $($(a)_file1)=no |
127 |
|
127 | $(a)_file=no |
128 |
|
128 | !else |
129 |
|
129 | $(a)_file=!trim $($(a)_file0) |
130 |
|
130 | !endif |
131 | !next |
131 | !next |
132 | Type_exo = $type_exo |
132 | Type_exo = $type_exo |
133 | !for a in file,source,reading_file,audio_file,image_file,video_file |
133 | !for a in file,source,reading_file,audio_file,image_file,video_file |
134 | $a=!nospace $($a) |
134 | $a=!nospace $($a) |
135 | $a=!deaccent $($a) |
135 | $a=!deaccent $($a) |
136 | !next |
136 | !next |
137 | modele=!record 0 of $dossier/COMMUN |
137 | modele=!record 0 of $dossier/COMMUN |
138 | date=!date '+%c' |
138 | date=!date '+%c' |
139 | modele= $name_warning\ |
139 | modele= $name_warning\ |
140 | %% $date\ |
140 | %% $date\ |
141 | \ |
141 | \ |
142 | $modele |
142 | $modele |
143 | 143 | ||
144 | !for a in $Type_exo |
144 | !for a in $Type_exo |
145 | mod=!record 0 of $dossier/$a |
145 | mod=!record 0 of $dossier/$a |
146 | modele =$modele\ |
146 | modele =$modele\ |
147 | $mod |
147 | $mod |
148 | !next |
148 | !next |
149 | - | ||
150 | modele=!replace internal IMAGES by $image_tag in $modele |
- | |
151 | modele=!replace internal VIDEO by $video_tag in $modele |
- | |
152 | modele=!replace internal READING by $reading_tag in $modele |
- | |
153 | modele=!replace internal _image_dir by \imagedir in $modele |
- | |
154 | 149 | ||
- | 150 | modele=!replace internal IMAGES by $image_tag in $modele |
|
- | 151 | modele=!replace internal VIDEO by $video_tag in $modele |
|
- | 152 | modele=!replace internal READING by $reading_tag in $modele |
|
- | 153 | modele=!replace internal _image_dir by \imagedir in $modele |
|
- | 154 | ||
155 | !for a in title,email,author |
155 | !for a in title,email,author |
156 | b=!trim $($a) |
156 | b=!trim $($a) |
157 | modele=!replace internal \$a{} by \$a{$b} in $modele |
157 | modele=!replace internal \$a{} by \$a{$b} in $modele |
158 | !next |
158 | !next |
159 | !setdef quick_title=$title in wimshome/$sesdir/var.stat |
159 | !setdef quick_title=$title in wimshome/$sesdir/var.stat |
160 | !setdef quick_source=$source in wimshome/$sesdir/var.stat |
160 | !setdef quick_source=$source in wimshome/$sesdir/var.stat |
161 | !for a in file, reading_file, audio_file, image_file, video_file,N, M, MAX,try,alea,\ |
161 | !for a in file, reading_file, audio_file, image_file, video_file,N, M, MAX,try,alea,\ |
162 | instruction,instruction2,\ |
162 | instruction,instruction2,\ |
163 | choice,answer_given,format,format0,common,second_step,first_step,pos_rep,percent,\ |
163 | choice,answer_given,format,format0,common,second_step,first_step,pos_rep,percent,\ |
164 | size,qcm_prompt1,qcm_prompt2,sens,aucune,partialscore,paste,\ |
164 | size,qcm_prompt1,qcm_prompt2,sens,aucune,partialscore,paste,\ |
165 | specialhelp1,specialhelp2,specialhelp3,specialhelp4,helpprompt,reaccent,packs,player,\ |
165 | specialhelp1,specialhelp2,specialhelp3,specialhelp4,helpprompt,reaccent,packs,player,\ |
166 |
|
166 | good_answer_text,bad_answer_text,incomplete_answer_text |
167 | b=!trim $($a) |
167 | b=!trim $($a) |
168 | !setdef quick_$a=$b in wimshome/$sesdir/var.stat |
168 | !setdef quick_$a=$b in wimshome/$sesdir/var.stat |
169 | modele=!replace internal \text{$a=} by \text{$a=$b} in $modele |
169 | modele=!replace internal \text{$a=} by \text{$a=$b} in $modele |
170 | !next |
170 | !next |
171 | !for a in style_question,style_reponse,style_oef,style_css |
171 | !for a in style_question,style_reponse,style_oef,style_css |
172 | b=!replace internal $\ |
172 | b=!replace internal $\ |
173 | $ by in $($a) |
173 | $ by in $($a) |
174 | b=!trim $b |
174 | b=!trim $b |
175 | !setdef quick_$a=$b in wimshome/$sesdir/var.stat |
175 | !setdef quick_$a=$b in wimshome/$sesdir/var.stat |
176 | modele=!replace internal _$a by $b in $modele |
176 | modele=!replace internal _$a by $b in $modele |
177 | !next |
177 | !next |
178 | modele=!replace internal \text{player_option=} by \text{player_option=$player_option} in $modele |
178 | modele=!replace internal \text{player_option=} by \text{player_option=$player_option} in $modele |
179 | modele=!replace internal \text{instruction=asis()} by \text{instruction=asis($instruction)} in $modele |
179 | modele=!replace internal \text{instruction=asis()} by \text{instruction=asis($instruction)} in $modele |
180 | modele=!replace internal \text{instruction2=asis()} by \text{instruction2=asis($instruction2)} in $modele |
180 | modele=!replace internal \text{instruction2=asis()} by \text{instruction2=asis($instruction2)} in $modele |
181 | modele=!replace internal \text{file=randitem()} by \text{file=randitem($($file))} in $modele |
181 | modele=!replace internal \text{file=randitem()} by \text{file=randitem($($file))} in $modele |
182 | !if yes iswordof $reading_file1 $image_file1 |
182 | !if yes iswordof $reading_file1 $image_file1 |
183 | help = !record 0 of $dossier/HELP |
183 | help = !record 0 of $dossier/HELP |
184 | !if $raw=1 |
184 | !if $raw=1 |
185 | help=!replace internal RAW(reading) by \special{expandlines \reading} in $help |
185 | help=!replace internal RAW(reading) by \special{expandlines \reading} in $help |
186 | !else |
186 | !else |
187 | help=!replace internal RAW(reading) by \reading in $help |
187 | help=!replace internal RAW(reading) by \reading in $help |
- | 188 | !endif |
|
188 | !endif |
189 | !endif |
189 | !endif |
- | |
190 | modele = $modele $help |
190 | modele = $modele $help |
191 | exo=$modele |
191 | exo=$modele |
192 | exo1 = !replace internal & by & in $exo |
192 | exo1 = !replace internal & by & in $exo |
193 | 193 | ||
194 | example= |
194 | example= |
195 | !if $wims_developer!=$empty |
195 | !if $wims_developer!=$empty |
196 | list_mod=!sh ls $wims_home/public_html/modules/devel/$wims_developer |
196 | list_mod=!sh ls $wims_home/public_html/modules/devel/$wims_developer |
197 | list_mod=!words2items $list_mod |
197 | list_mod=!words2items $list_mod |
198 | list_module= |
198 | list_module= |
199 | !for a in $list_mod |
199 | !for a in $list_mod |
200 | category = !module category devel/$wims_developer/$a |
200 | category = !module category devel/$wims_developer/$a |
201 | !if oef isin $category |
201 | !if oef isin $category |
202 | list_module=!append item $a to $list_module |
202 | list_module=!append item $a to $list_module |
- | 203 | !endif |
|
- | 204 | !next |
|
- | 205 | !if $list_module=$empty and $transfert=yes |
|
- | 206 | error = $error oefempty |
|
- | 207 | !endif |
|
- | 208 | !if $target issametext $name_choice |
|
- | 209 | target=$empty |
|
203 | !endif |
210 | !endif |
204 | !next |
- | |
205 | !if $list_module=$empty and $transfert=yes |
- | |
206 | error = $error oefempty |
- | |
207 | !endif |
- | |
208 | !if $target issametext $name_choice |
- | |
209 | target=$empty |
- | |
210 | !endif |
211 | !endif |
211 | !endif |
- | |
212 | 212 | ||
213 | !if $transfert=yes and $target!=$empty |
213 | !if $transfert=yes and $target!=$empty |
214 | !if / isin $target or .. isin $target |
214 | !if / isin $target or .. isin $target |
- | 215 | error=$error nom_fichier |
|
- | 216 | !exit |
|
- | 217 | !endif |
|
- | 218 | !if / isin $source or .. isin $source |
|
215 | error=$error nom_fichier |
219 | error=$error nom_fichier |
216 | !exit |
220 | !exit |
217 | !endif |
- | |
218 | !if / isin $source or .. isin $source |
- | |
219 | error=$error nom_fichier |
- | |
220 | !exit |
- | |
221 | !endif |
221 | !endif |
222 | dir=$wims_home/public_html/modules/devel/$wims_developer/$target |
222 | dir=$wims_home/public_html/modules/devel/$wims_developer/$target |
223 | !setdef common_images=yes\ |
223 | !setdef common_images=yes\ |
224 | class_importation=no in wimshome/public_html/modules/devel/$wims_developer/$target/var.proc |
224 | class_importation=no in wimshome/public_html/modules/devel/$wims_developer/$target/var.proc |
225 | !!debug $modele |
- | |
226 | !filewrite getfile/$source.oef $modele |
225 | !filewrite getfile/$source.oef $modele |
227 | !sh rm $dir/src/.oef\ |
226 | !sh rm $dir/src/.oef\ |
228 | find $dir -name .DS_Store -exec rm {} \; \ |
227 | find $dir -name .DS_Store -exec rm {} \; \ |
229 | cp $wims_home/$wims_sesdir/getfile/$source.oef $dir/src\ |
228 | cp $wims_home/$wims_sesdir/getfile/$source.oef $dir/src\ |
230 | cd $dir\ |
229 | cd $dir\ |
231 | src2def |
230 | src2def |
232 | 231 | ||
233 | !readproc listefile |
232 | !readproc listefile |
234 | !if / isin $wims_deposit or .. isin $wims_deposit |
233 | !if / isin $wims_deposit or .. isin $wims_deposit |
235 | !exit |
234 | !exit |
236 | !endif |
235 | !endif |
237 | !if $type_fichier > 0 |
236 | !if $type_fichier > 0 |
238 | !if $wims_deposit!=noname.file and $wims_deposit!=$empty \ |
237 | !if $wims_deposit!=noname.file and $wims_deposit!=$empty \ |