Subversion Repositories wimsdev

Rev

Rev 11640 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 11640 Rev 12520
Line 80... Line 80...
80
        !else
80
        !else
81
          $(a)_file1=no
81
          $(a)_file1=no
82
         !endif
82
         !endif
83
      !next
83
      !next
84
      compute=no
84
      compute=no
85
     example=
85
      example=
86
 
86
 
87
   !endif example
87
    !endif example
88
   !readproc values
88
    !readproc values
89
   !if $N issametext all
89
    !if $N issametext all
90
      N=\cnt_question
90
      N=\cnt_question
91
   !endif
91
    !endif
92
   !if $MAX1 issametext all or $MAX1=
92
    !if $MAX1 issametext all or $MAX1=
93
      MAX = \cnt_question
93
       MAX = \cnt_question
94
   !else
94
    !else
95
      MAX=$MAX1
95
       MAX=$MAX1
96
   !endif
96
    !endif
97
   !if $type_exo iswordof CORRESP
97
    !if $type_exo iswordof CORRESP
98
      size=$taille_corr
98
       size=$taille_corr
99
   !endif
99
    !endif
100
   !if $type_exo iswordof ORDONNE \
100
    !if $type_exo iswordof ORDONNE \
101
     or ($type_exo iswordof SELECTWORD SELECTWORDA GAP and ($format iswordof dragfill clickfill))
101
     or ($type_exo iswordof SELECTWORD SELECTWORDA GAP and ($format iswordof dragfill clickfill))
102
      size=$taille_drag
102
      size=$taille_drag
103
   !endif
103
    !endif
104
   !if $type_exo iswordof SELECTWORD SELECTWORDA GAP and $format=case
104
    !if $type_exo iswordof SELECTWORD SELECTWORDA GAP and $format=case
105
      size=$taille_case
105
       size=$taille_case
106
   !endif
106
    !endif
107
   !if $type_exo iswordof COMPOSE
107
    !if $type_exo iswordof COMPOSE
108
      size=$taille_compose
108
       size=$taille_compose
109
   !endif
109
    !endif
110
 
110
 
111
   !if $type_exo iswordof TRUEFALSE
111
    !if $type_exo iswordof TRUEFALSE
112
     choice=$choice_tf
112
      choice=$choice_tf
113
   !endif
113
    !endif
114
   !if $type_exo iswordof GAP
114
    !if $type_exo iswordof GAP
115
     choice=$choice_gap
115
      choice=$choice_gap
116
   !endif
116
    !endif
117
   !if $type_exo iswordof QUIFAITQUOI
117
    !if $type_exo iswordof QUIFAITQUOI
118
     choice=$taille_qq
118
      choice=$taille_qq
119
   !endif
119
    !endif
120
   !if $type_exo iswordof QCMIII
120
    !if $type_exo iswordof QCMIII
121
      choice=$choice_fd
121
       choice=$choice_fd
122
   !endif
122
    !endif
123
 
123
 
124
   liste =
124
    liste =
125
   !for a in reading, audio, image, video
125
    !for a in reading, audio, image, video
126
      !if $($(a)_file1)=no
126
      !if $($(a)_file1)=no
127
        $(a)_file=no
127
        $(a)_file=no
128
      !else
128
      !else
129
        $(a)_file=!trim $($(a)_file0)
129
        $(a)_file=!trim $($(a)_file0)
130
      !endif
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
 
Line 150... Line 150...
150
   modele=!replace internal IMAGES by $image_tag in $modele
150
   modele=!replace internal IMAGES by $image_tag in $modele
151
   modele=!replace internal VIDEO by $video_tag in $modele
151
   modele=!replace internal VIDEO by $video_tag in $modele
152
   modele=!replace internal READING by $reading_tag in $modele
152
   modele=!replace internal READING by $reading_tag in $modele
153
   modele=!replace internal _image_dir by \imagedir in $modele
153
   modele=!replace internal _image_dir by \imagedir in $modele
154
 
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
        good_answer_text,bad_answer_text,incomplete_answer_text
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
 
-
 
194
  example=
-
 
195
  !if $wims_developer!=$empty
-
 
196
    list_mod=!sh ls $wims_home/public_html/modules/devel/$wims_developer
-
 
197
    list_mod=!words2items $list_mod
-
 
198
    list_module=
-
 
199
    !for a in $list_mod
-
 
200
      category = !module category devel/$wims_developer/$a
-
 
201
      !if oef isin $category
-
 
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
-
 
210
    !endif
-
 
211
  !endif
193
 
212
 
194
   example=
-
 
195
   !if $wims_developer!=$empty
213
  !if $transfert=yes and $target!=$empty
196
       list_mod=!sh ls $wims_home/public_html/modules/devel/$wims_developer
214
    !if / isin $target or .. isin $target
197
       list_mod=!words2items $list_mod
215
      error=$error nom_fichier
198
       list_module=
216
    !exit
199
       !for a in $list_mod
217
  !endif
200
          category = !module category devel/$wims_developer/$a
218
  !if / isin $source or .. isin $source
201
         !if oef isin $category
219
    error=$error nom_fichier
202
            list_module=!append item $a to $list_module
-
 
203
         !endif
220
    !exit
204
       !next
221
  !endif
205
       !if $list_module=$empty and $transfert=yes
222
  dir=$wims_home/public_html/modules/devel/$wims_developer/$target
206
         error = $error oefempty
223
  !setdef common_images=yes\
-
 
224
  class_importation=no in wimshome/public_html/modules/devel/$wims_developer/$target/var.proc
207
       !endif
225
  !!debug $modele
208
       !if $target issametext $name_choice
226
  !filewrite getfile/$source.oef $modele
209
         target=$empty
227
  !sh rm $dir/src/.oef\
-
 
228
   find $dir -name .DS_Store -exec rm {} \; \
-
 
229
   cp $wims_home/$wims_sesdir/getfile/$source.oef $dir/src\
210
       !endif
230
   cd $dir\
211
   !endif
231
   src2def
212
 
232
 
213
   !if $transfert=yes and $target!=$empty
-
 
214
      !if / isin $target or .. isin $target
-
 
215
        error=$error nom_fichier
-
 
216
       !exit
-
 
217
      !endif
-
 
218
      !if / isin $source or .. isin $source
-
 
219
        error=$error nom_fichier
-
 
220
        !exit
-
 
221
      !endif
-
 
222
      dir=$wims_home/public_html/modules/devel/$wims_developer/$target
-
 
223
      !setdef common_images=yes\
-
 
224
      class_importation=no in wimshome/public_html/modules/devel/$wims_developer/$target/var.proc
-
 
225
     !!!debug $modele
-
 
226
      !filewrite getfile/$source.oef $modele
-
 
227
      !sh rm $dir/src/.oef\
-
 
228
       find $dir -name .DS_Store -exec rm {} \; \
-
 
229
       cp $wims_home/$wims_sesdir/getfile/$source.oef $dir/src\
-
 
230
       cd $dir\
-
 
231
       src2def
-
 
232
 
-
 
233
      !readproc listefile
233
  !readproc listefile
234
      !if  / isin $wims_deposit or .. isin $wims_deposit
234
    !if  / isin $wims_deposit or .. isin $wims_deposit
235
        !exit
235
      !exit
236
      !endif
236
    !endif
237
     !if $type_fichier > 0
237
    !if $type_fichier > 0
238
      !if $wims_deposit!=noname.file and $wims_deposit!=$empty \
238
      !if $wims_deposit!=noname.file and $wims_deposit!=$empty \
239
         and $wims_deposit!=.oef and $type_fichier > 0
239
         and $wims_deposit!=.oef and $type_fichier > 0
240
        !if $type_fichier=1
240
        !if $type_fichier=1
241
          file_transfert=$file
241
          file_transfert=$file
242
        !endif
242
        !endif
Line 249... Line 249...
249
        !if $type_fichier=4
249
        !if $type_fichier=4
250
          file_transfert=images/$audio_file
250
          file_transfert=images/$audio_file
251
        !endif
251
        !endif
252
        !if $type_fichier=5
252
        !if $type_fichier=5
253
        !sh cd $wims_home/$wims_sesdir\
253
        !sh cd $wims_home/$wims_sesdir\
254
             mv user-deposit getfile/$wims_deposit\
254
          mv user-deposit getfile/$wims_deposit\
255
             cp getfile/$wims_deposit $dir/images/$wims_deposit
255
          cp getfile/$wims_deposit $dir/images/$wims_deposit
256
        !else
256
        !else
257
          !if $type_fichier<=2
257
          !if $type_fichier<=2
258
           !sh cd $wims_home/$wims_sesdir\
258
            !sh cd $wims_home/$wims_sesdir\
259
             mv user-deposit getfile/$wims_deposit\
259
             mv user-deposit getfile/$wims_deposit\
260
             cd getfile\
260
             cd getfile\
261
             dos2unix -o $wims_deposit\
261
             dos2unix -o $wims_deposit\
262
             cd ..\
262
             cd ..\
263
             cp getfile/$wims_deposit $dir/$file_transfert
263
             cp getfile/$wims_deposit $dir/$file_transfert
Line 265... Line 265...
265
           !sh cd $wims_home/$wims_sesdir\
265
           !sh cd $wims_home/$wims_sesdir\
266
             mv user-deposit getfile/$wims_deposit\
266
             mv user-deposit getfile/$wims_deposit\
267
             cp getfile/$wims_deposit $dir/$file_transfert
267
             cp getfile/$wims_deposit $dir/$file_transfert
268
          !endif
268
          !endif
269
        !endif
269
        !endif
270
       !reset type_fichier
270
        !reset type_fichier
271
            dir=$wims_home/public_html/modules/devel/$wims_developer/$target
271
        dir=$wims_home/public_html/modules/devel/$wims_developer/$target
272
  !readproc listefile
272
        !readproc listefile
273
 
273
 
274
      !endif
274
      !endif
275
    !reset file_transfert
275
      !reset file_transfert
276
   !endif
276
    !endif
277
   !endif transfert
277
  !endif transfert
278
!endif
278
!endif
279
!set wims_ariane=!append line modtool,1,module=adm/modtool\
279
!set wims_ariane=!append line modtool,1,module=adm/modtool\
280
to $wims_ariane
280
to $wims_ariane
281
!if $type_exo!=$empty
281
!if $type_exo!=$empty
282
    !set wims_ariane=!append line quicktool,1,module=$module\
282
  !set wims_ariane=!append line quicktool,1,module=$module\
283
to $wims_ariane
283
to $wims_ariane
284
!else
284
!else
285
   !set wims_ariane=!append line quicktool,8, to $wims_ariane
285
  !set wims_ariane=!append line quicktool,8, to $wims_ariane
286
!endif
286
!endif
287
!set wims_ariane_self=no
287
!set wims_ariane_self=no
288
 
288
 
289
!if $wims_theme=default
289
!if $wims_theme=default
290
  !set wims_menu_items=!append line $wims_ariane to $wims_menu_items
290
  !set wims_menu_items=!append line $wims_ariane to $wims_menu_items
291
  !reset wims_ariane
291
  !reset wims_ariane
292
!endif
292
!endif
293
 
293
 
294
class_importation=no
294
class_importation=no
295
 
295
 
296
wims_module_log= $cmd $Type_exo
296
wims_module_log= $cmd $Type_exo
297
 
-
 
298
 
-