Rev 16568 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
14537 | guerimand | 1 | !! not allow for other than type=3 |
2 | !if $type!=3 |
||
3 | job=configfw |
||
4 | !changeto $job.proc |
||
5 | !endif |
||
6 | |||
7 | !if $putiworkco!=1 |
||
8 | error=putworknotallow |
||
9 | job=configfw |
||
10 | !changeto $job.proc |
||
11 | !endif |
||
12 | |||
13 | !! -------- check for valid student (in class) |
||
14 | !bound userv within $ulist default $empty |
||
15 | !if $userv=$empty |
||
16 | error=putworkusernotexists |
||
17 | job=configfw |
||
18 | !changeto $job.proc |
||
19 | !endif |
||
20 | |||
21 | |||
22 | !! -------- test si la copie de l'etudiant existe (pas de depot de correction si pas de copie) |
||
23 | |||
24 | !readproc proc/findfile3.proc $freework,$userv |
||
25 | !if $output=$empty |
||
26 | error=studentwithoutfw |
||
27 | job=configfw |
||
28 | !changeto $job.proc |
||
29 | !endif |
||
30 | |||
16324 | guerimand | 31 | !! -------- save remark |
16568 | guerimand | 32 | finalremark=!char 1 to 1000 of $finalremark |
33 | finalremark=!replace internal : by : in $finalremark |
||
34 | !writefile wimshome/log/classes/$wims_class/freeworksdata/$freework/co/$userv $finalremark |
||
16324 | guerimand | 35 | |
16568 | guerimand | 36 | |
14766 | guerimand | 37 | !! ------------ save new score (only if scoring>0) |
38 | !if $scoring>0 |
||
39 | key2=!positionof item $userv in $ulist |
||
16338 | guerimand | 40 | sendscore=$score |
14766 | guerimand | 41 | !bound score between 0 and $maxscore default $empty |
16338 | guerimand | 42 | !if $sendscore!=$score |
43 | error=badscore |
||
44 | !endif |
||
14766 | guerimand | 45 | key=!positionof item $userv in $uulist |
46 | list=!values 0 for v=1 to $nbscore |
||
47 | list=!replace internal 0 by $empty in $list |
||
48 | !if $key=$empty |
||
16066 | guerimand | 49 | !if $nbscore>1 |
50 | list=!replace item number $scoring by $score in $list |
||
51 | !else |
||
52 | list=$score |
||
53 | !endif |
||
14766 | guerimand | 54 | !appendfile wimshome/log/classes/$wims_class/.grades :$userv,$(flist[$key2]) $(llist[$key2]),$list |
55 | uulist=!append item $userv to $uulist |
||
56 | !else |
||
57 | update_content=!record $[$key+1] of wimshome/log/classes/$wims_class/.grades |
||
58 | update_content=!append item $list to $update_content |
||
59 | update_content=!item 1 to $[$nbscore+2] of $update_content |
||
60 | update_content=!replace item number $[$scoring+2] by $score in $update_content |
||
61 | update_field=$[$key+1] |
||
62 | update_nbline=$empty |
||
63 | !read adm/uprecord wimshome/log/classes/$wims_class/.grades |
||
64 | !endif |
||
18282 | czzmrn | 65 | !reset score |
66 | !reset sendscore |
||
14537 | guerimand | 67 | !endif |
16324 | guerimand | 68 | |
69 | !! -------- save new file |
||
70 | !readproc adm/class/quotafree.proc proc |
||
71 | oldsize=0 |
||
72 | !if $wims_deposit!=$empty and $wims_deposit!=noname.file and / notin $wims_deposit and .. notin $wims_deposit |
||
73 | du=!sh du -ks $wims_home/$wims_sesdir/user-deposit |
||
74 | du=!word 1 of $du |
||
75 | newsize=$[($du)/1024] |
||
76 | !read proc/checkfilename.proc |
||
16338 | guerimand | 77 | !if $error!=badfilename |
78 | success=goodaddfile |
||
79 | !if $quota_free-$newsize<0 |
||
80 | error=quota_filestudent |
||
81 | !reset success |
||
82 | !else |
||
83 | !!mise en place du nouveau fichier |
||
16545 | guerimand | 84 | !sh mkdir -p $wims_home/log/classes/$wims_class/freeworksdata/$freework/co/$(userv)-file;\ |
85 | mv $wims_home/$wims_sesdir/user-deposit $wims_home/log/classes/$wims_class/freeworksdata/$freework/co/$(userv)-file/$newfilename; |
||
16338 | guerimand | 86 | !endif |
16324 | guerimand | 87 | !endif |
88 | !endif |
||
89 | |||
16338 | guerimand | 90 | job=viewuser3 |
91 | !changeto $job.proc |