Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
11100 | obado | 1 | # CLEAN WORKSHEET script : |
2 | # test if a sheet has already been used (if there are scores for it), and replace scores by "deact noscore" |
||
3 | # Input : |
||
4 | # $wims_home |
||
5 | # $wims_class |
||
6 | # $sheet |
||
7 | # Output : |
||
8 | # if $worktest isn't empty, there are scores associated to the sheet. |
||
9 | |||
10 | #You must call before : !read check.worksheet |
||
11 | |||
12 | !if $worktest!=$empty |
||
13 | worktest=!singlespace $worktest |
||
14 | !sh cd $wims_home/log/classes/$wims_class\ |
||
15 | for user in $worktest\ |
||
16 | do\ |
||
17 | awk 'length($$1)!=17 || $$3!=$sheet {print}' score/$$user >awk.tmp1\ |
||
18 | awk 'length($$1)==17 && $$3==$sheet {print $$0" deact noscore"}' score/$$user >awk.tmp2\ |
||
19 | mv awk.tmp1 score/$$user\ |
||
20 | cat awk.tmp2 >>noscore/$$user\ |
||
21 | done\ |
||
22 | rm -f awk.tmp* |
||
23 | |||
24 | !endif |