Subversion Repositories wimsdev

Rev

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

Rev 5181 Rev 10176
Line 1... Line 1...
1
!!@#language independant 
1
!!@#language independant
2
!read adm/language lang/names.phtml
2
!read adm/language lang/names.phtml
3
 
3
 
4
!read tabletheme
4
!read tabletheme
5
!!!for the moment no language version, because only one example module
5
!!!for the moment no language version, because only one example module
6
!set example_dir=lang/example.fr
6
!set example_dir=lang/example.fr
Line 33... Line 33...
33
              !if $($a)=$empty
33
              !if $($a)=$empty
34
                 error= $error $a
34
                 error= $error $a
35
              !endif
35
              !endif
36
          !next
36
          !next
37
           compute=yes
37
           compute=yes
38
      !endif       
38
      !endif
39
   !else
39
   !else
40
      !for a in type_exo,title,author,email,file,N,MAX1,M,try,\
40
      !for a in type_exo,title,author,email,file,N,MAX1,M,try,\
41
        instruction,instruction2,answer_given,alea,choice,format,format0,\
41
        instruction,instruction2,answer_given,alea,choice,format,format0,\
42
        percent,pos_rep,common,second_step,first_step,\
42
        percent,pos_rep,common,second_step,first_step,\
43
        file, reading_file, audio_file,image_file,video_file,size,source,\
43
        file, reading_file, audio_file,image_file,video_file,size,source,\
44
        style_question,style_reponse,style_oef,style_css,\
44
        style_question,style_reponse,style_oef,style_css,\
45
        reading_tag,image_tag,video_tag,qcm_prompt1,qcm_prompt2,\
45
        reading_tag,image_tag,video_tag,qcm_prompt1,qcm_prompt2,\
46
        sens,aucune,raw,partialscore,paste,specialhelp1,specialhelp2,\
46
        sens,aucune,raw,partialscore,paste,specialhelp1,specialhelp2,\
47
        specialhelp3,specialhelp4,helpprompt,reaccent,packs,player,player_option,\
47
        specialhelp3,specialhelp4,helpprompt,reaccent,packs,player,player_option,\
48
        good_answer_text,bad_answer_text,incomplete_answer_text,\
48
        good_answer_text,bad_answer_text,incomplete_answer_text,\
49
    
49
 
50
        $(a) =!getdef $a in $example_dir/$TYPE/$example
50
        $(a) =!getdef $a in $example_dir/$TYPE/$example
51
      !next
51
      !next
52
      !if $type_exo iswordof CORRESP
52
      !if $type_exo iswordof CORRESP
53
        taille_corr=$size
53
        taille_corr=$size
54
      !endif
54
      !endif
55
      !if $type_exo iswordof ORDONNE \
55
      !if $type_exo iswordof ORDONNE \
56
         or ($type_exo iswordof SELECTWORD SELECTWORDA GAP and ($format iswordof dragfill clickfill)) 
56
         or ($type_exo iswordof SELECTWORD SELECTWORDA GAP and ($format iswordof dragfill clickfill))
57
         taille_drag=$size
57
         taille_drag=$size
58
      !endif
58
      !endif
59
      !if $type_exo iswordof SELECTWORD SELECTWORDA GAP and $format=case
59
      !if $type_exo iswordof SELECTWORD SELECTWORDA GAP and $format=case
60
         taille_case=$size
60
         taille_case=$size
61
      !endif
61
      !endif
62
      !if $type_exo iswordof COMPOSE
62
      !if $type_exo iswordof COMPOSE
63
         taille_compose=$size
63
         taille_compose=$size
64
      !endif
64
      !endif
65
      
65
 
66
      !if $type_exo iswordof TRUEFALSE
66
      !if $type_exo iswordof TRUEFALSE
67
         choice_tf=$choice
67
         choice_tf=$choice
68
      !endif
68
      !endif
69
      !if $type_exo iswordof GAP
69
      !if $type_exo iswordof GAP
70
         choice_gap=$choice
70
         choice_gap=$choice
Line 73... Line 73...
73
        choice_qq=$choice
73
        choice_qq=$choice
74
      !endif
74
      !endif
75
      !if $type_exo iswordof QCMIII
75
      !if $type_exo iswordof QCMIII
76
         choice_fd=$choice
76
         choice_fd=$choice
77
      !endif
77
      !endif
78
      
78
 
79
      !for a in reading,audio,image,video
79
      !for a in reading,audio,image,video
80
        !if $($(a)_file) notsametext no and $($(a)_file)!=$empty
80
        !if $($(a)_file) notsametext no and $($(a)_file)!=$empty
81
          $(a)_file0=$($(a)_file)
81
          $(a)_file0=$($(a)_file)
82
          $(a)_file1=yes
82
          $(a)_file1=yes
83
        !else
83
        !else
84
          $(a)_file1=no
84
          $(a)_file1=no
85
         !endif
85
         !endif
86
      !next
86
      !next
87
      compute=no
87
      compute=no
88
     example=
88
     example=
89
       
89
 
90
   !endif example
90
   !endif example
91
   !readproc values
91
   !readproc values
92
   !if $N issametext all
92
   !if $N issametext all
93
      N=\cnt_question
93
      N=\cnt_question
94
   !endif
94
   !endif
95
   !if $MAX1 issametext all or $MAX1=
95
   !if $MAX1 issametext all or $MAX1=
96
      MAX = \cnt_question
96
      MAX = \cnt_question
97
   !else
97
   !else
98
      MAX=$MAX1
98
      MAX=$MAX1
99
   !endif
99
   !endif
100
   !if $type_exo iswordof CORRESP  
100
   !if $type_exo iswordof CORRESP
101
      size=$taille_corr
101
      size=$taille_corr
102
   !endif
102
   !endif
103
   !if $type_exo iswordof ORDONNE \
103
   !if $type_exo iswordof ORDONNE \
104
     or ($type_exo iswordof SELECTWORD SELECTWORDA GAP and ($format iswordof dragfill clickfill))
104
     or ($type_exo iswordof SELECTWORD SELECTWORDA GAP and ($format iswordof dragfill clickfill))
105
      size=$taille_drag
105
      size=$taille_drag
Line 122... Line 122...
122
   !endif
122
   !endif
123
   !if $type_exo iswordof QCMIII
123
   !if $type_exo iswordof QCMIII
124
      choice=$choice_fd
124
      choice=$choice_fd
125
   !endif
125
   !endif
126
 
126
 
127
   liste = 
127
   liste =
128
   !for a in reading, audio, image, video
128
   !for a in reading, audio, image, video
129
      !if $($(a)_file1)=no
129
      !if $($(a)_file1)=no
130
        $(a)_file=no
130
        $(a)_file=no
131
      !else 
131
      !else
132
        $(a)_file=!trim $($(a)_file0)
132
        $(a)_file=!trim $($(a)_file0)
133
      !endif
133
      !endif
134
   !next
134
   !next
135
   Type_exo = $type_exo
135
   Type_exo = $type_exo
136
   !for a in file,source,reading_file,audio_file,image_file,video_file
136
   !for a in file,source,reading_file,audio_file,image_file,video_file
Line 145... Line 145...
145
$modele
145
$modele
146
 
146
 
147
   !for a in $Type_exo
147
   !for a in $Type_exo
148
     mod=!record 0 of $dossier/$a
148
     mod=!record 0 of $dossier/$a
149
     modele =$modele\
149
     modele =$modele\
150
     $mod   
150
     $mod
151
   !next
151
   !next
152
   
152
 
153
   modele=!replace internal IMAGES by $image_tag in  $modele
153
   modele=!replace internal IMAGES by $image_tag in  $modele
154
   modele=!replace internal VIDEO by $video_tag in  $modele
154
   modele=!replace internal VIDEO by $video_tag in  $modele
155
   modele=!replace internal READING by $reading_tag in  $modele
155
   modele=!replace internal READING by $reading_tag in  $modele
156
   modele=!replace internal _image_dir by \imagedir in  $modele
156
   modele=!replace internal _image_dir by \imagedir in  $modele
157
   
157
 
158
   !for a in title,email,author
158
   !for a in title,email,author
159
     b=!trim $($a)
159
     b=!trim $($a)
160
     modele=!replace internal \$a{} by \$a{$b} in  $modele
160
     modele=!replace internal \$a{} by \$a{$b} in  $modele
161
   !next
161
   !next
162
  !setdef quick_title=$title in wimshome/$sesdir/var.stat
162
  !setdef quick_title=$title in wimshome/$sesdir/var.stat
163
  !setdef quick_source=$source in wimshome/$sesdir/var.stat
163
  !setdef quick_source=$source in wimshome/$sesdir/var.stat
164
  !for a in file, reading_file, audio_file, image_file, video_file,N, M, MAX,try,alea,\
164
  !for a in file, reading_file, audio_file, image_file, video_file,N, M, MAX,try,alea,\
165
      instruction,instruction2,\
165
      instruction,instruction2,\
166
      choice,answer_given,format,format0,common,second_step,first_step,pos_rep,percent,\
166
      choice,answer_given,format,format0,common,second_step,first_step,pos_rep,percent,\
Line 188... Line 188...
188
       help=!replace internal RAW(reading) by \special{expandlines \reading} in  $help
188
       help=!replace internal RAW(reading) by \special{expandlines \reading} in  $help
189
     !else
189
     !else
190
       help=!replace internal RAW(reading) by \reading in  $help
190
       help=!replace internal RAW(reading) by \reading in  $help
191
     !endif
191
     !endif
192
   !endif
192
   !endif
193
   modele = $modele $help 
193
   modele = $modele $help
194
   exo=$modele
194
   exo=$modele
195
   exo1 = !replace internal & by & in $exo
195
   exo1 = !replace internal & by & in $exo
196
   
196
 
197
   example=
197
   example=
198
   !if $wims_developer!=$empty
198
   !if $wims_developer!=$empty
199
       list_mod=!sh ls $wims_home/public_html/modules/devel/$wims_developer
199
       list_mod=!sh ls $wims_home/public_html/modules/devel/$wims_developer
200
       list_mod=!words2items $list_mod
200
       list_mod=!words2items $list_mod
201
       list_module=
201
       list_module=
202
       !for a in $list_mod
202
       !for a in $list_mod
203
          category = !module category devel/$wims_developer/$a  
203
          category = !module category devel/$wims_developer/$a
204
         !if oef isin $category
204
         !if oef isin $category
205
            list_module=!append item $a to $list_module
205
            list_module=!append item $a to $list_module
206
         !endif
206
         !endif
207
       !next
207
       !next
208
       !if $list_module=$empty and $transfert=yes
208
       !if $list_module=$empty and $transfert=yes
209
         error = $error oefempty
209
         error = $error oefempty
210
       !endif
210
       !endif
211
       !if $target issametext $name_choice
211
       !if $target issametext $name_choice
212
         target=$empty
212
         target=$empty
213
       !endif
213
       !endif
214
   !endif
214
   !endif
215
 
215
 
216
   !if $transfert=yes and $target!=$empty
216
   !if $transfert=yes and $target!=$empty
217
      !if / isin $target or .. isin $target
217
      !if / isin $target or .. isin $target
218
        error=$error nom_fichier     
218
        error=$error nom_fichier
219
       !exit
219
       !exit
220
      !endif
220
      !endif
221
      !if / isin $source or .. isin $source
221
      !if / isin $source or .. isin $source
222
        error=$error nom_fichier
222
        error=$error nom_fichier
223
        !exit
223
        !exit
Line 230... Line 230...
230
      !sh rm $dir/src/.oef\
230
      !sh rm $dir/src/.oef\
231
       find $dir -name .DS_Store -exec rm {} \; \
231
       find $dir -name .DS_Store -exec rm {} \; \
232
       cp $wims_home/$wims_sesdir/getfile/$source.oef $dir/src\
232
       cp $wims_home/$wims_sesdir/getfile/$source.oef $dir/src\
233
       cd $dir\
233
       cd $dir\
234
       src2def
234
       src2def
235
       
235
 
236
      !readproc listefile
236
      !readproc listefile
237
      !if  / isin $wims_deposit or .. isin $wims_deposit
237
      !if  / isin $wims_deposit or .. isin $wims_deposit
238
        !exit
238
        !exit
239
      !endif
239
      !endif
240
     !if $type_fichier > 0
240
     !if $type_fichier > 0
241
      !if $wims_deposit!=noname.file and $wims_deposit!=$empty \
241
      !if $wims_deposit!=noname.file and $wims_deposit!=$empty \
242
         and $wims_deposit!=.oef and $type_fichier > 0
242
         and $wims_deposit!=.oef and $type_fichier > 0
243
        !if $type_fichier=1
243
        !if $type_fichier=1
244
          file_transfert=$file
244
          file_transfert=$file
245
        !endif
245
        !endif
246
        !if $type_fichier=2
246
        !if $type_fichier=2
247
          file_transfert=$reading_file
247
          file_transfert=$reading_file
248
        !endif
248
        !endif
249
        !if $type_fichier=3
249
        !if $type_fichier=3
250
          file_transfert=images/$image_file 
250
          file_transfert=images/$image_file
251
        !endif
251
        !endif
252
        !if $type_fichier=4
252
        !if $type_fichier=4
253
          file_transfert=images/$audio_file
253
          file_transfert=images/$audio_file
254
        !endif
254
        !endif
255
        !if $type_fichier=5
255
        !if $type_fichier=5
256
        !sh cd $wims_home/$wims_sesdir\
256
        !sh cd $wims_home/$wims_sesdir\
257
             mv user-deposit getfile/$wims_deposit\
257
             mv user-deposit getfile/$wims_deposit\
258
             cp getfile/$wims_deposit $dir/images/$wims_deposit
258
             cp getfile/$wims_deposit $dir/images/$wims_deposit
259
        !else
259
        !else
260
          !if $type_fichier<=2
260
          !if $type_fichier<=2
261
           !sh cd $wims_home/$wims_sesdir\
261
           !sh cd $wims_home/$wims_sesdir\
262
             mv user-deposit getfile/$wims_deposit\
262
             mv user-deposit getfile/$wims_deposit\
263
             cd getfile\
263
             cd getfile\
264
             dos2unix -o $wims_deposit\
264
             dos2unix -o $wims_deposit\
265
             cd ..\
265
             cd ..\
266
             cp getfile/$wims_deposit $dir/$file_transfert
266
             cp getfile/$wims_deposit $dir/$file_transfert
267
          !else
267
          !else
268
           !sh cd $wims_home/$wims_sesdir\
268
           !sh cd $wims_home/$wims_sesdir\
269
             mv user-deposit getfile/$wims_deposit\
269
             mv user-deposit getfile/$wims_deposit\
270
             cp getfile/$wims_deposit $dir/$file_transfert
270
             cp getfile/$wims_deposit $dir/$file_transfert
271
          !endif                     
271
          !endif
272
        !endif      
272
        !endif
273
       !reset type_fichier
273
       !reset type_fichier
274
            dir=$wims_home/public_html/modules/devel/$wims_developer/$target
274
            dir=$wims_home/public_html/modules/devel/$wims_developer/$target
275
  !readproc listefile
275
  !readproc listefile
276
      
276
 
277
      !endif
277
      !endif
278
    !reset file_transfert
278
    !reset file_transfert
279
   !endif
279
   !endif
280
   !endif transfert
280
   !endif transfert
281
!endif
281
!endif
-
 
282
!set wims_ariane=!append line modtool,1,module=adm/modtool\
-
 
283
to $wims_ariane
-
 
284
!if $type_exo!=$empty
-
 
285
    !set wims_ariane=!append line quicktool,1,module=$module\
-
 
286
to $wims_ariane
-
 
287
!else
-
 
288
   !set wims_ariane=!append line quicktool,8, to $wims_ariane
-
 
289
!endif
-
 
290
!set wims_ariane_self=no
282
 
291
 
-
 
292
!if $wims_theme=default
-
 
293
  !set wims_menu_items=!append line $wims_ariane to $wims_menu_items
-
 
294
  !reset wims_ariane
-
 
295
!endif
283
 
296
 
284
class_importation=no
297
class_importation=no
285
 
298
 
286
wims_module_log= $cmd $Type_exo
299
wims_module_log= $cmd $Type_exo
287
 
300