Subversion Repositories wimsdev

Rev

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

!! process control page for student and type=3

!if $activetest!=1 and $activetest!=2
  error=badallows
  emptypage=yes
  !exit
!endif

!! ---- read structure of the freework
!distribute item 0,0 into nbrezoneteacher,nbrezonestudent
nb=!recordcnt wimshome/log/classes/$wims_class/freeworks/.freework$freework
!for k=1 to $nb
  dt=!record $k of wimshome/log/classes/$wims_class/freeworks/.freework$freework
  l=!line 1 of $dt
  !distribute word $l into t,u
  !bound u within teacher,student default teacher
  !bound t within correction,$listfilename_ztype default $(listfilename_ztype[1])
  !if $t=solution
    flistsolution=!line 2 to -1 of $dt
    flistsolution=!nonempty line $flistsolution
    flistsolution=!lines2items $flistsolution
  !else
    !increase nbrezone$u
    ztype$(u)$(nbrezone$u)=$t
    script_data=!line 2 to -1 of $dt
    !readproc applet/$t pararead $u $(nbrezone$u)
  !endif
!next k

!set appletnum=0
!set studentmode=1

!if $activetest=1
  !readproc adm/class/quotafree.proc proc
  !readproc proc/findfile3.proc $freework,$wims_user
  d1=!text select char 0123456789 in $(deadline)$(timedeadline)
  d2=!text select char 0123456789 in $wims_now
  d2=!char 1 to 12 of $d2
  !reset toolate
  !if $d2>$d1
    toolate=yes
    studentmode=0
  !endif
!else
  studentmode=0
!endif

!! read parameter process for each participant zone
!for i=1 to $nbrezonestudent
  !read applet/$(ztypestudent$i) displayread student $i $studentmode $wims_user
!next i

!if $codownload=1 or $activetest>=2
  remark=!record 0 of wimshome/log/classes/$wims_class/freeworksdata/$freework/co/$wims_user
  remark=!replace internal : by : in $remark
!endif

!! ---- save zone content (only student zone)
!if $job2=savezone and $toolate!=yes
  !if $stype isitemof student and $zone>=1 and $zone<=$(nbrezonestudent)
    !! --- only if it is a correct zone ()
    !readproc applet/$(ztype$(stype)$zone) displaysave $stype $zone 1 $wims_user
  !endif
!endif