Rev 14297 | Rev 14572 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 14297 | Rev 14537 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | !! |
1 | !! process page for student for type=1 or type=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 | d1=!text select char 0123456789 in $(deadline)$(timedeadline) |
|
- | 10 | d2=!text select char 0123456789 in $wims_now |
|
- | 11 | d2=!char 1 to 12 of $d2 |
|
- | 12 | d3=!text select char 0123456789 in $(soldate)$(timesoldate) |
|
- | 13 | !reset toolate |
|
- | 14 | !if $d2>$d1 |
|
- | 15 | toolate=yes |
|
7 | !endif |
16 | !endif |
8 | 17 | ||
9 | !if $type>=2 and $activetest=1 |
18 | !if $type>=2 and $activetest=1 |
10 | !readproc adm/class/quotafree.proc proc |
19 | !readproc adm/class/quotafree.proc proc |
11 | !readproc proc/findfile.proc $freework,$wims_user |
20 | !readproc proc/findfile.proc $freework,$wims_user |
Line 17... | Line 26... | ||
17 | delold=rm -f $wims_home/log/classes/$wims_class/freeworksdata/$freework/work/$(data_0[2]) |
26 | delold=rm -f $wims_home/log/classes/$wims_class/freeworksdata/$freework/work/$(data_0[2]) |
18 | test=!fileexists wimshome/sessions/$wims_session/getfile/freeworksdata/work$freework-$(data_0[2]) |
27 | test=!fileexists wimshome/sessions/$wims_session/getfile/freeworksdata/work$freework-$(data_0[2]) |
19 | !if $test=yes |
28 | !if $test=yes |
20 | delold=$delold;\ |
29 | delold=$delold;\ |
21 | rm -f $wims_home/sessions/$wims_session/getfile/freeworksdata/work$freework-$(data_0[2]) |
30 | rm -f $wims_home/sessions/$wims_session/getfile/freeworksdata/work$freework-$(data_0[2]) |
22 | !endif |
- | |
23 | !endif |
- | |
24 | d1=!text select char 0123456789 in $(deadline)$(timedeadline) |
- | |
25 | d2=!text select char 0123456789 in $wims_now |
- | |
26 | d2=!char 1 to 12 of $d2 |
- | |
27 | d3=!text select char 0123456789 in $(soldate)$(timesoldate) |
- | |
28 | !reset toolate,codownload |
- | |
29 | !if $d2>$d1 |
- | |
30 | toolate=yes |
- | |
31 | !endif |
- | |
32 | !! -------- test condition to download user corrected work file (date + all work corrected). |
- | |
33 | !if $d2>=$d3 |
- | |
34 | n1=!filelist $wims_home/log/classes/$wims_class/freeworksdata/$freework/work |
- | |
35 | n1=!linecnt $n1 |
- | |
36 | n2=!filelist $wims_home/log/classes/$wims_class/freeworksdata/$freework/co |
- | |
37 | n2=!linecnt $n2 |
- | |
38 | !if $n2=$n1 |
- | |
39 | codownload=yes |
- | |
40 | !endif |
31 | !endif |
41 | !endif |
32 | !endif |
42 | !if $toolate!=yes and $wims_deposit!=$empty and / notin $wims_deposit and .. notin $wims_deposit |
33 | !if $toolate!=yes and $wims_deposit!=$empty and / notin $wims_deposit and .. notin $wims_deposit |
43 | du=!sh du -ks $wims_home/$wims_sesdir/user-deposit |
34 | du=!sh du -ks $wims_home/$wims_sesdir/user-deposit |
44 | du=!word 1 of $du |
35 | du=!word 1 of $du |
Line 72... | Line 63... | ||
72 | !readproc proc/findfile.proc $freework,$wims_user |
63 | !readproc proc/findfile.proc $freework,$wims_user |
73 | !endif |
64 | !endif |
74 | !! ------ make download link for work and co if don't exists |
65 | !! ------ make download link for work and co if don't exists |
75 | !if $data_0!=$empty |
66 | !if $data_0!=$empty |
76 | !reset m |
67 | !reset m |
77 | !if |
68 | !if $codownload=1 and $(data_0[5])!=$empty |
78 | test=!fileexists wimshome/sessions/$wims_session/getfile/freeworksdata/workco$freework-$(data_0[5]) |
69 | test=!fileexists wimshome/sessions/$wims_session/getfile/freeworksdata/workco$freework-$(data_0[5]) |
79 | !if $test!=yes |
70 | !if $test!=yes |
80 | m=ln -s $wims_home/log/classes/$wims_class/freeworksdata/$freework/co/$(data_0[5]) workco$freework-$(data_0[5]); |
71 | m=ln -s $wims_home/log/classes/$wims_class/freeworksdata/$freework/co/$(data_0[5]) workco$freework-$(data_0[5]); |
81 | !endif |
72 | !endif |
82 | !endif |
73 | !endif |