Rev 15483 | Rev 18120 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2845 | guerimand | 1 | check_list=!item 2 to -1 of $name_dest |
2971 | guerimand | 2 | nbcheck_list=!itemcnt $check_list |
3 | val_list=!values v for v=1 to $nbcheck_list |
||
2845 | guerimand | 4 | |
2977 | guerimand | 5 | !if $step=$empty |
15421 | bpr | 6 | output=!sh cd $wims_home/log/classes; \ |
2971 | guerimand | 7 | for file in .teacher-cls .supervisor-supercls .supervisor-portal .teacher-supercls .teacher-portal; do \ |
8 | cat $$file | cut -d"," -f3 | sort | uniq | awk 'END{print NR }'; \ |
||
9 | done; |
||
15421 | bpr | 10 | output=!lines2items $output |
11 | cnt_list=1,$output |
||
12 | !exit |
||
2977 | guerimand | 13 | !endif |
14 | |||
15 | !if $step=1 |
||
15421 | bpr | 16 | sendmail_dest=!listintersect $sendmail_dest and $val_list |
17 | file=!item $sendmail_dest of ,.teacher-cls,.supervisor-supercls,.supervisor-portal,.teacher-supercls,.teacher-portal |
||
18 | file=!items2words $file |
||
15483 | bpr | 19 | list=!sh cd $wims_home/log/classes;\ |
15421 | bpr | 20 | cat $file | cut -d"," -f3 | sort | uniq |
21 | list=!lines2items $list |
||
22 | save_list=!nonempty item $list |
||
23 | !if 1 isitemof $sendmail_dest |
||
24 | save_list=!append item $wims_site_manager to $save_list |
||
25 | !endif |
||
26 | save_subject=!char 1 to 100 of $sendmail_subject |
||
27 | save_msg=!char 1 to 1000 of $sendmail_msg |
||
28 | !if $sendmail_subject=$empty or $sendmail_msg=$empty |
||
29 | error=bad_mail |
||
30 | step=$empty |
||
31 | !endif |
||
32 | !if $save_list=$empty |
||
33 | error=bad_list |
||
34 | step=$empty |
||
35 | !endif |
||
36 | !exit |
||
2977 | guerimand | 37 | !endif |
38 | |||
39 | !if $step=2 |
||
7181 | bpr | 40 | !for us in $save_list |
8372 | bpr | 41 | |
42 | !! the blank line is compulsory |
||
15488 | obado | 43 | !mailto $us\ |
44 | $wims_site_manager\ |
||
7181 | bpr | 45 | [WIMS $wims_servername] $save_subject\ |
8372 | bpr | 46 | $save_msg\ |
7181 | bpr | 47 | |
8372 | bpr | 48 | |
7181 | bpr | 49 | !next us |
2845 | guerimand | 50 | !endif |