Subversion Repositories wimsdev

Rev

Rev 9878 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

!default uu=$wims_read_parm

!!! perhaps should be a command in wims.c ?
!!! variables which are necessary : wims_class, checksessions
!!! FIXME 64= max of exam number
!!! FIXME max of session number
!for i in $activexams
 !reset Dureeexam_$i
 !for jj=1 to 64
 !! jj correspond to maximum of number sessions
   !reset duree$(jj)_$(i)
!! jj correspond to exos in an exam
   !reset exam$(i)_$jj
  !next
!next

sc=!record 0 of wimshome/log/classes/$wims_class/score/$uu.exam
nsc=!linecnt $sc
!for i=1 to $nsc
  l=!line $i of $sc
  !distribute words $l into e_,s_,t__,T_,i_,S_,t_
  !set jj=!positionof item $S_ in $checksessions
  !set score$(jj)_$e_=$s_
  !set exam_$jj=$e_
  !if $s_ issametext 00
    start$(jj)_$e_=$t_
    dur$(jj)_$e_=$T_
  !endif
  !if $t__ issametext -1
    duree$(jj)_$(e_)=$[$T_ - $(dur$(jj)_$e_)]
  !endif
!next

!for i in $activexams
 !reset Dureeexam_$i
 !for e=1 to 64
   !reset exam$(i)_$e Exam_$(i)_$(e)
 !next
 !for ses_ in $checksessions
   !set jj=!positionof item $ses_ in $checksessions
   !if $(duree$(jj)_$i)!=$empty
        Dureeexam_$i=!append item $(duree$(jj)_$i) to $(Dureeexam_$i)
   !endif
 !next
!next

!!details des notes examens par session
!for ses_ in $checksessions
   !set jj=!positionof item $ses_ in $checksessions
   !set ss=!sh grep "$ses_" $wims_home/log/classes/$wims_class/noscore/$uu | grep "score" | awk -F"\t" '{print $$1}' | awk -F" " '{print $$3,$$4,$$6}'
   !set ss=!lines2rows $ss
   !set ss=!words2items $ss
   !set i = $(exam_$(jj))
     !set s_=!select $ss where column 1=$i
     !set nbx=!recordcnt wimshome/log/classes/$wims_class/exams/.exam$i
     !for k_=1 to $nbx
       !reset s
       !set s=!select $s_ where column 2=$k_
       !set s=$(s[3])
       !if $s!=$empty
         !set s=$[rint($s*$scoremax)/10]
       !endif
       !set Exam_$(i)_$(jj)=$(Exam_$(i)_$(jj)) $s,
   !next
!next