Rev 7608 | Rev 12701 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
23 | reyssat | 1 | sec=!defof class_secure in wimshome/log/classes/$wims_class/.def |
2 | sec=!trim $sec |
||
3 | htest=!checkhost $sec |
||
4 | !if ($sec=$empty or $htest<1) and $wims_ismanager<2 |
||
5 | error=not_secure |
||
6 | !exit |
||
7 | !endif |
||
8 | !readdef wimshome/log/classes/$wims_class/neighbors |
||
11774 | bpr | 9 | tmp_recshare=!defof class_recshare in wimshome/log/classes/$wims_class/.def |
10 | !if ($sharable_sheet!=$empty or $sharing_sheet!=$empty or $tmp_recshare=main) and share notwordof $confirmed |
||
11 | !reset tmp_recshare |
||
23 | reyssat | 12 | !if $confirm=yes and $wims_ismanager>1 |
13 | confirmed=share |
||
6353 | bpr | 14 | confirm= |
23 | reyssat | 15 | !else |
6353 | bpr | 16 | !!!verification a faire .... |
17 | !if $wims_superclass=$empty or $wims_superclass=$wims_class |
||
18 | !for cl_ in $sharable_sheet |
||
19 | !set tmp=!defof sharing_sheet in wimshome/log/classes/$cl_/neighbors |
||
20 | !if $wims_class iswordof $tmp |
||
21 | confirm= |
||
22 | confirmed= |
||
23 | error=sharing_sheet |
||
24 | !reset tmp |
||
25 | !exit |
||
26 | !endif |
||
27 | !next |
||
28 | !else |
||
29 | confirm= |
||
30 | confirmed= |
||
31 | error=sharing_sheet |
||
32 | !exit |
||
33 | !endif |
||
23 | reyssat | 34 | !endif |
35 | !endif |
||
36 | examtest=!sh grep '\<$sheet\.' $wims_home/log/classes/$wims_class/exams/.exam[0-9]* |
||
37 | !if $examtest!=$empty |
||
38 | error=sheet_in_exam |
||
39 | !exit |
||
40 | !endif |
||
41 | worktest=!sh cd $wims_home/log/classes/$wims_class\ |
||
42 | list=`ls score | grep -v '\.exam$$'`\ |
||
43 | if [ ! -e "$$list" ]; then\ |
||
44 | cd score; awk 'length($$1)==17 && $$3==$sheet {print FILENAME; nextfile}' $$list\ |
||
45 | fi |
||
46 | !if $worktest!=$empty |
||
47 | worktest2=!replace word supervisor by $ in $worktest |
||
48 | worktest2=!trim $worktest2 |
||
49 | !if $confirm!=yes or (share iswordof $confirmed and $worktest2!=$empty) |
||
50 | error=non_empty_activities |
||
51 | !exit |
||
52 | !else |
||
53 | worktest=!singlespace $worktest |
||
54 | !sh cd $wims_home/log/classes/$wims_class\ |
||
55 | for user in $worktest\ |
||
56 | do\ |
||
57 | awk 'length($$1)!=17 || $$3!=$sheet {print}' score/$$user >awk.tmp1\ |
||
7608 | bpr | 58 | awk 'length($$1)==17 && $$3==$sheet {print $$0" deact noscore"}' score/$$user >awk.tmp2\ |
23 | reyssat | 59 | mv awk.tmp1 score/$$user\ |
60 | cat awk.tmp2 >>noscore/$$user\ |
||
61 | done\ |
||
62 | rm -f awk.tmp* |
||
63 | !endif |
||
64 | !endif |
||
65 | !distribute item 1,0 into update_field,update_content |
||
66 | !read update.sheet |
||
67 | !read writeweights |
||
68 | job= |
||
4598 | bpr | 69 | wims_class_log=deactivate sheet $sheet by $wims_realuser |