Subversion Repositories wimsdev

Rev

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