Subversion Repositories wimsdev

Rev

Rev 17639 | 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
 
17639 czzmrn 9
!! ---- check techvar access
17883 czzmrn 10
!readproc proc/checktechvars.proc
11
!if $fwaccess=no
17639 czzmrn 12
  !exit
13
!endif
14
!! ---- end check techvar access
15
 
14788 guerimand 16
!set appletnum=0
17
 
18
!! ----- check of authorisation for student to modify his work (studentmode=0 no studentmode=1 yes)
19
!set studentmode=1
20
!if $activetest=1
21
  !readproc adm/class/quotafree.proc proc
22
  !readproc proc/findfile3.proc $freework,$wims_user
23
  d1=!text select char 0123456789 in $(deadline)$(timedeadline)
24
  d2=!text select char 0123456789 in $wims_now
25
  d2=!char 1 to 12 of $d2
26
  !reset toolate
27
  !if $d2>$d1
28
    toolate=yes
29
    studentmode=0
30
  !endif
31
!else
32
  studentmode=0
33
!endif
34
 
17593 czzmrn 35
!if $studentclose=1
36
  !if $job2=confirm and $confirm=$name_close_confirm
17598 czzmrn 37
    !setdef freework_closeco_$wims_user=$wims_now in wimshome/log/classes/$wims_class/freeworksdata/$freework/.closeco
17593 czzmrn 38
  !endif
39
 
40
  !if $job2=consigne and $consigne=$name_close_doclose
41
    studentmode=0
42
  !endif
43
 
44
  test_close=!defof freework_closeco_$wims_user in wimshome/log/classes/$wims_class/freeworksdata/$freework/.closeco
45
 
46
  !if $test_close!=$empty
47
    studentmode=0
48
  !endif
49
 
50
  !reset consigne confirm giveup  
51
!endif
52
 
14537 guerimand 53
!! ---- read structure of the freework
16324 guerimand 54
!distribute item 0,0,$empty into nbrezoneteacher,nbrezonestudent,ltdownloadzone
14537 guerimand 55
nb=!recordcnt wimshome/log/classes/$wims_class/freeworks/.freework$freework
56
!for k=1 to $nb
57
  dt=!record $k of wimshome/log/classes/$wims_class/freeworks/.freework$freework
58
  l=!line 1 of $dt
59
  !distribute word $l into t,u
60
  !bound u within teacher,student default teacher
14788 guerimand 61
  !bound t within solution,$listfilename_ztype default $(listfilename_ztype[1])
14537 guerimand 62
  !if $t=solution
63
    flistsolution=!line 2 to -1 of $dt
64
    flistsolution=!nonempty line $flistsolution
65
    flistsolution=!lines2items $flistsolution
66
  !else
67
    !increase nbrezone$u
68
    ztype$(u)$(nbrezone$u)=$t
69
    script_data=!line 2 to -1 of $dt
70
    !readproc applet/$t pararead $u $(nbrezone$u)
14788 guerimand 71
    !! -- read display parameters for each zone
17565 czzmrn 72
    !if $u!=student or $job2!=savezone or $t isitemof $studentfile_ztype
14796 guerimand 73
      !read applet/$t displayread $u $(nbrezone$u) $studentmode $wims_user
74
    !endif
14537 guerimand 75
  !endif
76
!next k
14796 guerimand 77
ltdownloadzone=!listintersection $ltdownloadzone and $zonelistlabelstudent
14537 guerimand 78
 
14796 guerimand 79
!! ---- save zone content (only student zone)
80
!if $job2=savezone and $toolate!=yes
81
  !for zone=1 to $(nbrezonestudent)
82
    !readproc applet/$(ztypestudent$zone) displaysave student $zone 1 $wims_user
83
  !next zone
84
!endif
85
!readproc proc/studentusedspace.proc
86
!! ---- save file for zonetype=file
87
l=!makelist deposit X,erase X for X in $zonelistlabelstudent
88
l=!nospace $l
89
!if $job2 isitemof $l and $toolate!=yes
90
  nb=!char -1 of $job2
91
  !if $(ztypestudent$nb)=file
92
    job2=!char 1 to -2 of $job2
93
    !readproc applet/file displaysave student $nb 1 $wims_user
94
  !endif
95
  !reset job2
96
  !readproc proc/studentusedspace.proc
97
!endif
98
 
16568 guerimand 99
!if $seealltime=1
100
  remark=!record 0 of wimshome/log/classes/$wims_class/freeworksdata/$freework/co/.$wims_user
14537 guerimand 101
  remark=!replace internal : by : in $remark
102
!endif
103
 
16568 guerimand 104
!if $codownload=1 or $activetest>=2
105
  finalremark=!record 0 of wimshome/log/classes/$wims_class/freeworksdata/$freework/co/$wims_user
106
  finalremark=!replace internal : by : in $finalremark
107
!endif
14796 guerimand 108