Rev 16568 | Rev 17593 | 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 |
16324 | guerimand | 29 | !distribute item 0,0,$empty into nbrezoneteacher,nbrezonestudent,ltdownloadzone |
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 |
17565 | czzmrn | 47 | !if $u!=student or $job2!=savezone or $t isitemof $studentfile_ztype |
14796 | guerimand | 48 | !read applet/$t displayread $u $(nbrezone$u) $studentmode $wims_user |
49 | !endif |
||
14537 | guerimand | 50 | !endif |
51 | !next k |
||
14796 | guerimand | 52 | ltdownloadzone=!listintersection $ltdownloadzone and $zonelistlabelstudent |
14537 | guerimand | 53 | |
14796 | guerimand | 54 | !! ---- save zone content (only student zone) |
55 | !if $job2=savezone and $toolate!=yes |
||
56 | !for zone=1 to $(nbrezonestudent) |
||
57 | !readproc applet/$(ztypestudent$zone) displaysave student $zone 1 $wims_user |
||
58 | !next zone |
||
59 | !endif |
||
60 | !readproc proc/studentusedspace.proc |
||
61 | !! ---- save file for zonetype=file |
||
62 | l=!makelist deposit X,erase X for X in $zonelistlabelstudent |
||
63 | l=!nospace $l |
||
64 | !if $job2 isitemof $l and $toolate!=yes |
||
65 | nb=!char -1 of $job2 |
||
66 | !if $(ztypestudent$nb)=file |
||
67 | job2=!char 1 to -2 of $job2 |
||
68 | !readproc applet/file displaysave student $nb 1 $wims_user |
||
69 | !endif |
||
70 | !reset job2 |
||
71 | !readproc proc/studentusedspace.proc |
||
72 | !endif |
||
73 | |||
16568 | guerimand | 74 | !if $seealltime=1 |
75 | remark=!record 0 of wimshome/log/classes/$wims_class/freeworksdata/$freework/co/.$wims_user |
||
14537 | guerimand | 76 | remark=!replace internal : by : in $remark |
77 | !endif |
||
78 | |||
16568 | guerimand | 79 | !if $codownload=1 or $activetest>=2 |
80 | finalremark=!record 0 of wimshome/log/classes/$wims_class/freeworksdata/$freework/co/$wims_user |
||
81 | finalremark=!replace internal : by : in $finalremark |
||
82 | !endif |
||
14796 | guerimand | 83 |