Rev 14758 | Rev 14796 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 14758 | Rev 14788 | ||
---|---|---|---|
Line 2... | Line 2... | ||
2 | 2 | ||
3 | !if $activetest!=1 and $activetest!=2 |
3 | !if $activetest!=1 and $activetest!=2 |
4 | error=badallows |
4 | error=badallows |
5 | emptypage=yes |
5 | emptypage=yes |
6 | !exit |
6 | !exit |
- | 7 | !endif |
|
- | 8 | ||
- | 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 |
|
7 | !endif |
26 | !endif |
8 | 27 | ||
9 | !! ---- read structure of the freework |
28 | !! ---- read structure of the freework |
10 | !distribute item |
29 | !distribute item 0,0,$empty into nbrezoneteacher,nbrezonestudent,userfilezonelist |
11 | nb=!recordcnt wimshome/log/classes/$wims_class/freeworks/.freework$freework |
30 | nb=!recordcnt wimshome/log/classes/$wims_class/freeworks/.freework$freework |
12 | !for k=1 to $nb |
31 | !for k=1 to $nb |
13 | dt=!record $k of wimshome/log/classes/$wims_class/freeworks/.freework$freework |
32 | dt=!record $k of wimshome/log/classes/$wims_class/freeworks/.freework$freework |
14 | l=!line 1 of $dt |
33 | l=!line 1 of $dt |
15 | !distribute word $l into t,u |
34 | !distribute word $l into t,u |
16 | !bound u within teacher,student default teacher |
35 | !bound u within teacher,student default teacher |
17 | !bound t within |
36 | !bound t within solution,$listfilename_ztype default $(listfilename_ztype[1]) |
18 | !if $t=solution |
37 | !if $t=solution |
19 | flistsolution=!line 2 to -1 of $dt |
38 | flistsolution=!line 2 to -1 of $dt |
20 | flistsolution=!nonempty line $flistsolution |
39 | flistsolution=!nonempty line $flistsolution |
21 | flistsolution=!lines2items $flistsolution |
40 | flistsolution=!lines2items $flistsolution |
22 | !else |
41 | !else |
23 | !increase nbrezone$u |
42 | !increase nbrezone$u |
24 | ztype$(u)$(nbrezone$u)=$t |
43 | ztype$(u)$(nbrezone$u)=$t |
25 | script_data=!line 2 to -1 of $dt |
44 | script_data=!line 2 to -1 of $dt |
26 | !readproc applet/$t pararead $u $(nbrezone$u) |
45 | !readproc applet/$t pararead $u $(nbrezone$u) |
- | 46 | !! -- read display parameters for each zone |
|
- | 47 | !read applet/$t displayread $u $(nbrezone$u) $studentmode $wims_user |
|
27 | !endif |
48 | !endif |
28 | !next k |
49 | !next k |
29 | - | ||
30 | !set appletnum=0 |
- | |
31 | !set studentmode=1 |
- | |
32 | - | ||
33 | !if $activetest=1 |
- | |
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 |
- | |
44 | !else |
- | |
45 | studentmode=0 |
- | |
46 | !endif |
- | |
47 | - | ||
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 | 50 | ||
53 | !if $codownload=1 or $activetest>=2 |
51 | !if $codownload=1 or $activetest>=2 |
54 | remark=!record 0 of wimshome/log/classes/$wims_class/freeworksdata/$freework/co/$wims_user |
52 | remark=!record 0 of wimshome/log/classes/$wims_class/freeworksdata/$freework/co/$wims_user |
55 | remark=!replace internal : by : in $remark |
53 | remark=!replace internal : by : in $remark |
56 | !endif |
54 | !endif |
57 | 55 | ||
58 | !! ---- save zone content (only student zone) |
56 | !! ---- save zone content (only student zone) |
59 | !if $job2=savezone and $toolate!=yes |
57 | !if ($job2=savezone or $job2=erasezone) and $toolate!=yes |
60 | !if $stype isitemof student and $zone>=1 and $zone<=$(nbrezonestudent) |
58 | !if $stype isitemof student and $zone>=1 and $zone<=$(nbrezonestudent) |
61 | !! --- only if it is a correct zone () |
59 | !! --- only if it is a correct zone () |
62 | !readproc applet/$(ztype$(stype)$zone) displaysave $stype $zone 1 $wims_user |
60 | !readproc applet/$(ztype$(stype)$zone) displaysave $stype $zone 1 $wims_user |
63 | !endif |
61 | !endif |
64 | !endif |
62 | !endif |