Subversion Repositories wimsdev

Rev

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

Rev 17840 Rev 17907
Line 567... Line 567...
567
!if $job=activate and $[$activetest]=0 or ($exam_mode=1 and $job=text and $[$activetest]=0)
567
!if $job=activate and $[$activetest]=0 or ($exam_mode=1 and $job=text and $[$activetest]=0)
568
  !if $job=activate and $[$activetest]=0
568
  !if $job=activate and $[$activetest]=0
569
    !distribute item 1,1 into update_field,update_content
569
    !distribute item 1,1 into update_field,update_content
570
    !read update.exam
570
    !read update.exam
571
  !endif
571
  !endif
572
  !if $exam_mode=1
572
  !if $exam_mode=1 and $exocnt > 1
573
    !! fix exercise dependancy in case of course mode to lock exercice order
573
    !! fix exercise dependancy in case of course mode to lock exercice order
574
    !! and protect for adress hack
574
    !! and protect for adress hack
575
    dataexam=$empty
575
    dataexam=$empty
576
    dataexam=!record 1 of wimshome/log/classes/$wims_class/exams/.exam$exam
576
    dataexam=!record 1 of wimshome/log/classes/$wims_class/exams/.exam$exam
-
 
577
    !if $dataexam!=$empty
-
 
578
      !! if you move some other exercise in first position, need to clear
-
 
579
      !! dependencies
-
 
580
      dtlen=!linecnt $dataexam
-
 
581
      !if $dtlen > 3
-
 
582
        dataexam=!replace line number 4 by $empty in $dataexam
-
 
583
      !endif
577
    dataexam=:$dataexam
584
      dataexam=:$dataexam
578
    !for k=2 to $exocnt
585
      !for k=2 to $exocnt
579
      dt=!record $k of wimshome/log/classes/$wims_class/exams/.exam$exam
586
        dt=!record $k of wimshome/log/classes/$wims_class/exams/.exam$exam
-
 
587
	dtlen=!linecnt $dt
-
 
588
	!if $dtlen < 4
580
      dt=$dt\
589
	  dt=$dt\
581
\
590
\
582
 
591
 
-
 
592
	!endif
583
      dt=!replace line number 4 by $[$k-1]:$minscore in $dt
593
        dt=!replace line number 4 by $[$k-1]:$minscore in $dt
584
      dataexam=!append line :$dt to $dataexam
594
        dataexam=!append line :$dt to $dataexam
585
    !next k
595
      !next k
586
    !writefile wimshome/log/classes/$wims_class/exams/.exam$exam $dataexam
596
      !writefile wimshome/log/classes/$wims_class/exams/.exam$exam $dataexam
-
 
597
    !endif
587
  !endif
598
  !endif
588
  !if $job=activate
599
  !if $job=activate
589
    activetest=1
600
    activetest=1
590
  !endif
601
  !endif
591
!endif
602
!endif