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