Rev 16307 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 16307 | Rev 16338 | ||
---|---|---|---|
Line 40... | Line 40... | ||
40 | !if $wims_deposit!=$empty and $wims_deposit!=noname.file and / notin $wims_deposit and .. notin $wims_deposit |
40 | !if $wims_deposit!=$empty and $wims_deposit!=noname.file and / notin $wims_deposit and .. notin $wims_deposit |
41 | du=!sh du -ks $wims_home/$wims_sesdir/user-deposit |
41 | du=!sh du -ks $wims_home/$wims_sesdir/user-deposit |
42 | du=!word 1 of $du |
42 | du=!word 1 of $du |
43 | newsize=$[($du)/1024] |
43 | newsize=$[($du)/1024] |
44 | !read proc/checkfilename.proc $freework |
44 | !read proc/checkfilename.proc $freework |
45 | !if |
45 | !if $error!=badfilename |
46 | !exit |
- | |
47 | !else |
- | |
48 | exten=!replace internal . by , in $newfilename |
46 | exten=!replace internal . by , in $newfilename |
49 | n=!itemcnt $exten |
47 | n=!itemcnt $exten |
50 | !if $n>=2 |
48 | !if $n>=2 |
51 | exten=!item -1 of $exten |
49 | exten=!item -1 of $exten |
52 | exten=.$exten |
50 | exten=.$exten |
53 | !else |
51 | !else |
54 | exten=$empty |
52 | exten=$empty |
55 | !endif |
53 | !endif |
56 | !endif |
- | |
57 | success=goodaddfile |
54 | success=goodaddfile |
58 | !if $quota_free-$newsize-$oldsize<0 |
55 | !if $quota_free-$newsize-$oldsize<0 |
59 | error=quota_filestudent |
56 | error=quota_filestudent |
60 | !reset success |
57 | !reset success |
61 | !else |
58 | !else |
62 | !!mise en place du nouveau fichier (et destruction de l'ancien s'il existe) |
59 | !!mise en place du nouveau fichier (et destruction de l'ancien s'il existe) |
63 | !sh $delold mv $wims_home/$wims_sesdir/user-deposit $wims_home/log/classes/$wims_class/freeworksdata/$freework/co/$student$exten; |
60 | !sh $delold mv $wims_home/$wims_sesdir/user-deposit $wims_home/log/classes/$wims_class/freeworksdata/$freework/co/$student$exten; |
64 | !if $(data_0[5])=$empty |
61 | !if $(data_0[5])=$empty |
65 | !if $notcorrected=1 |
62 | !if $notcorrected=1 |
66 | !restart module=$module&freework=$freework&job=configfw |
63 | !restart module=$module&freework=$freework&job=configfw |
67 | !else |
64 | !else |
68 | !increase nbcorrectedcopies |
65 | !increase nbcorrectedcopies |
69 | notcorrected=$[$nbcopies-$nbcorrectedcopies] |
66 | notcorrected=$[$nbcopies-$nbcorrectedcopies] |
- | 67 | !endif |
|
70 | !endif |
68 | !endif |
71 | !endif |
69 | !endif |
72 | !endif |
70 | !endif |
73 | !endif |
71 | !endif |
74 | !! ------------ save new score (only if scoring>0) |
72 | !! ------------ save new score (only if scoring>0) |
75 | !if $scoring>0 |
73 | !if $scoring>0 |
76 | m=!record 0 of wimshome/log/classes/$wims_class/sheets/.severity |
74 | m=!record 0 of wimshome/log/classes/$wims_class/sheets/.severity |
77 | maxscore=!word 1 of $m |
75 | maxscore=!word 1 of $m |
78 | !bound maxscore between 0 and 100000 default 10 |
76 | !bound maxscore between 0 and 100000 default 10 |
79 | key2=!positionof item $student in $ulist |
77 | key2=!positionof item $student in $ulist |
- | 78 | sendscore=$(score$key2) |
|
80 | !bound score$key2 between 0 and $maxscore default $empty |
79 | !bound score$key2 between 0 and $maxscore default $empty |
- | 80 | !if $sendscore!=$(score$key2) |
|
- | 81 | error=badscore |
|
- | 82 | !endif |
|
81 | key=!positionof item $student in $uulist |
83 | key=!positionof item $student in $uulist |
82 | list=!values 0 for v=1 to $nbscore |
84 | list=!values 0 for v=1 to $nbscore |
83 | list=!replace internal 0 by $empty in $list |
85 | list=!replace internal 0 by $empty in $list |
84 | !if $key=$empty |
86 | !if $key=$empty |
85 | list=!replace item number $scoring by $(score$key2) in $list |
87 | list=!replace item number $scoring by $(score$key2) in $list |