Rev 14395 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
12701 | bpr | 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 |
||
23 | reyssat | 5 | error=not_secure |
6 | !exit |
||
12701 | bpr | 7 | !endif |
8 | !readdef wimshome/log/classes/$wims_class/neighbors |
||
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 |
||
11774 | bpr | 11 | !reset tmp_recshare |
23 | reyssat | 12 | !if $confirm=yes and $wims_ismanager>1 |
12701 | bpr | 13 | confirmed=share |
14 | confirm= |
||
23 | reyssat | 15 | !else |
12701 | 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 |
12701 | bpr | 35 | !endif |
14395 | bpr | 36 | tmpcnt=!recordcnt wimshome/log/classes/$wims_class/exams/.exams |
37 | !for exa=1 to $tmpcnt |
||
38 | examtest=!sh grep '\<$sheet\.' $wims_home/log/classes/$wims_class/exams/.exam$exa | grep -v ':' |
||
39 | !if $examtest!=$empty |
||
40 | !!supplementary check |
||
41 | tmp=!recordcnt wimshome/log/classes/$wims_class/exams/.exam$exa |
||
42 | !for tmp2=1 to $tmp |
||
43 | tmp_l=!record $tmp2 of wimshome/log/classes/$wims_class/exams/.exam$exa |
||
44 | tmp_l=!line 2 of $tmp_l |
||
45 | examtest=!sh echo '$tmp_l' | grep '\<$sheet\.' |
||
46 | !if $examtest!=$empty |
||
47 | error=sheet_in_exam $exa |
||
48 | !exit |
||
49 | !endif |
||
50 | !next |
||
51 | !endif |
||
52 | !next |
||
53 | |||
12701 | bpr | 54 | worktest=!sh cd $wims_home/log/classes/$wims_class\ |
55 | list=`ls score | grep -v '\.exam$$'`\ |
||
56 | if [ ! -e "$$list" ]; then\ |
||
14395 | bpr | 57 | cd score; awk 'length($$1)==17 && $$3==$sheet {print FILENAME; nextfile}' $$list\ |
12701 | bpr | 58 | fi |
59 | !if $worktest!=$empty |
||
23 | reyssat | 60 | worktest2=!replace word supervisor by $ in $worktest |
61 | worktest2=!trim $worktest2 |
||
62 | !if $confirm!=yes or (share iswordof $confirmed and $worktest2!=$empty) |
||
12701 | bpr | 63 | error=non_empty_activities |
64 | !exit |
||
23 | reyssat | 65 | !else |
12701 | bpr | 66 | worktest=!singlespace $worktest |
67 | !sh cd $wims_home/log/classes/$wims_class\ |
||
68 | for user in $worktest\ |
||
69 | do\ |
||
70 | awk 'length($$1)!=17 || $$3!=$sheet {print}' score/$$user >awk.tmp1\ |
||
71 | awk 'length($$1)==17 && $$3==$sheet {print $$0" deact noscore"}' score/$$user >awk.tmp2\ |
||
72 | mv awk.tmp1 score/$$user\ |
||
73 | cat awk.tmp2 >>noscore/$$user\ |
||
74 | done\ |
||
75 | rm -f awk.tmp* |
||
23 | reyssat | 76 | !endif |
12701 | bpr | 77 | !endif |
78 | !distribute item 1,0 into update_field,update_content |
||
79 | !read update.sheet |
||
15771 | guerimand | 80 | !read proc/writeweights |
12701 | bpr | 81 | job= |
82 | wims_class_log=deactivate sheet $sheet by $wims_realuser |