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