Subversion Repositories wimsdev

Rev

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

Rev 17527 Rev 17542
Line 215... Line 215...
215
  exam_mode=!line 9 of $activetest
215
  exam_mode=!line 9 of $activetest
216
  !default exam_mode=0
216
  !default exam_mode=0
217
  activetest=!line 1 of $activetest
217
  activetest=!line 1 of $activetest
218
  exocnt=!recordcnt wimshome/log/classes/$wims_class/exams/.exam$exam
218
  exocnt=!recordcnt wimshome/log/classes/$wims_class/exams/.exam$exam
219
  !if $job=student
219
  !if $job=student
-
 
220
    !!relecture du fichier lang pour utiliser mode_exam
-
 
221
    !read lang/names.phtml.$moduclass_lang
220
    !if $wims_exrandomlist=$empty or $(wims_exrandomlist[2;])!=$exam
222
    !if $wims_exrandomlist=$empty or $(wims_exrandomlist[2;])!=$exam
221
      !if exrandomlist iswordof $class_option and $exam_mode!=1
223
      !if exrandomlist iswordof $class_option and $exam_mode!=1
222
        wims_exrandomlist=!shuffle $exocnt
224
        wims_exrandomlist=!shuffle $exocnt
223
      !else
225
      !else
224
        wims_exrandomlist=!makelist x for x = 1 to $exocnt
226
        wims_exrandomlist=!makelist x for x = 1 to $exocnt
Line 243... Line 245...
243
  activetest=-1
245
  activetest=-1
244
  exocnt=0
246
  exocnt=0
245
  !default expiration=$class_expiration
247
  !default expiration=$class_expiration
246
!endif
248
!endif
247
 
249
 
248
!!----desactivation d'examen soumis à condition : pas de partage, pas de score élève, certains type de classe (FG).
250
!!----desactivation d'examen soumis à condition :
-
 
251
  !!pas de partage, pas de score élève,
-
 
252
  !!  certains types de classe (FG).
249
!!----desactivation possible dans un programme sans cours
253
!!----desactivation possible dans un programme sans cours
250
!! tests faits differemment dans adm/class/sheet ...
254
!! tests faits differemment dans adm/class/sheet ...
251
testsharing=!defof sharable_exam\
255
testsharing=!defof sharable_exam\
252
sharing_exam in wimshome/log/classes/$wims_class/neighbors
256
sharing_exam in wimshome/log/classes/$wims_class/neighbors
253
testsharing=!lines2items $testsharing
257
testsharing=!lines2items $testsharing
Line 547... Line 551...
547
 
551
 
548
!if $job=activate and $[$activetest]=0
552
!if $job=activate and $[$activetest]=0
549
  !distribute item 1,1 into update_field,update_content
553
  !distribute item 1,1 into update_field,update_content
550
  !read update.exam
554
  !read update.exam
551
  !if $exam_mode=1
555
  !if $exam_mode=1
552
    !! fix exercise dependancy in case of course mode to lock exercice order and protect for adress hack
556
    !! fix exercise dependancy in case of course mode to lock exercice order
-
 
557
    !! and protect for adress hack
553
    dataexam=$empty
558
    dataexam=$empty
554
    dataexam=!record 1 of wimshome/log/classes/$wims_class/exams/.exam$exam
559
    dataexam=!record 1 of wimshome/log/classes/$wims_class/exams/.exam$exam
555
    dataexam=:$dataexam
560
    dataexam=:$dataexam
556
    !for k=2 to $exocnt
561
    !for k=2 to $exocnt
557
      dt=!record $k of wimshome/log/classes/$wims_class/exams/.exam$exam
562
      dt=!record $k of wimshome/log/classes/$wims_class/exams/.exam$exam
558
      dt=$dt\
563
      dt=$dt\
559
\
564
\
560
 
565
 
561
      dt=!replace line number 4 by $[$k-1]:10 in $dt
566
      dt=!replace line number 4 by $[$k-1]:100 in $dt
562
      dataexam=!append line :$dt to $dataexam
567
      dataexam=!append line :$dt to $dataexam
563
    !next k
568
    !next k
564
    !writefile wimshome/log/classes/$wims_class/exams/.exam$exam $dataexam
569
    !writefile wimshome/log/classes/$wims_class/exams/.exam$exam $dataexam
565
  !endif
570
  !endif
566
  activetest=1
571
  activetest=1