Subversion Repositories wimsdev

Rev

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

Rev Author Line No. Line
14537 guerimand 1
!! process control page for student and type=3
2
 
3
!if $activetest!=1 and $activetest!=2
4
  error=badallows
5
  emptypage=yes
6
  !exit
7
!endif
8
 
9
!! ---- read structure of the freework
10
!distribute item 0,0 into nbrezoneteacher,nbrezonestudent
11
nb=!recordcnt wimshome/log/classes/$wims_class/freeworks/.freework$freework
12
!for k=1 to $nb
13
  dt=!record $k of wimshome/log/classes/$wims_class/freeworks/.freework$freework
14
  l=!line 1 of $dt
15
  !distribute word $l into t,u
16
  !bound u within teacher,student default teacher
17
  !bound t within correction,$listfilename_ztype default $(listfilename_ztype[1])
18
  !if $t=solution
19
    flistsolution=!line 2 to -1 of $dt
20
    flistsolution=!nonempty line $flistsolution
21
    flistsolution=!lines2items $flistsolution
22
  !else
23
    !increase nbrezone$u
24
    ztype$(u)$(nbrezone$u)=$t
25
    script_data=!line 2 to -1 of $dt
26
    !readproc applet/$t pararead $u $(nbrezone$u)
27
  !endif
28
!next k
29
 
30
!set appletnum=0
31
!set studentmode=1
32
 
33
!if $activetest=1
14572 bpr 34
  !readproc adm/class/quotafree.proc proc
35
  !readproc proc/findfile3.proc $freework,$wims_user
36
  d1=!text select char 0123456789 in $(deadline)$(timedeadline)
37
  d2=!text select char 0123456789 in $wims_now
38
  d2=!char 1 to 12 of $d2
39
  !reset toolate
40
  !if $d2>$d1
41
    toolate=yes
42
    studentmode=0
43
  !endif
14537 guerimand 44
!else
14572 bpr 45
  studentmode=0
14537 guerimand 46
!endif
47
 
14758 guerimand 48
!! read parameter process for each participant zone
49
!for i=1 to $nbrezonestudent
50
  !read applet/$(ztypestudent$i) displayread student $i $studentmode $wims_user
51
!next i
52
 
14537 guerimand 53
!if $codownload=1 or $activetest>=2
54
  remark=!record 0 of wimshome/log/classes/$wims_class/freeworksdata/$freework/co/$wims_user
55
  remark=!replace internal : by : in $remark
56
!endif
57
 
58
!! ---- save zone content (only student zone)
59
!if $job2=savezone and $toolate!=yes
60
  !if $stype isitemof student and $zone>=1 and $zone<=$(nbrezonestudent)
61
    !! --- only if it is a correct zone ()
62
    !readproc applet/$(ztype$(stype)$zone) displaysave $stype $zone 1 $wims_user
63
  !endif
64
!endif