Subversion Repositories wimsdev

Rev

Rev 18120 | 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
18120 bpr 12
  dev=!recordcnt wimshome/log/.developers
13
  cnt_list=$cnt_list,$dev
15421 bpr 14
  !exit
2977 guerimand 15
!endif
16
 
17
!if $step=1
15421 bpr 18
  sendmail_dest=!listintersect $sendmail_dest and $val_list
18120 bpr 19
  sendmail_dest1=!listcomplement 7 in $sendmail_dest
20
  file=!item $sendmail_dest1 of ,.teacher-cls,.supervisor-supercls,.supervisor-portal,.teacher-supercls,.teacher-portal
18124 bpr 21
  file=!items2words $file
15483 bpr 22
  list=!sh cd $wims_home/log/classes;\
15421 bpr 23
    cat $file | cut -d"," -f3 | sort | uniq
18120 bpr 24
  !!fichier devel
25
  !if 7 isin $sendmail_dest
26
    dev=!recordcnt wimshome/log/.developers
27
    !for j=1 to $dev
28
      !set tmp=!record $j of wimshome/log/.developers
29
      !set tmp=!line 4 of $tmp
30
      !set list=!append line $tmp to $list
31
    !next
32
    !reset tmp
33
  !endif
34
  !!end fichier devel
15421 bpr 35
  list=!lines2items $list
36
  save_list=!nonempty item $list
37
  !if 1 isitemof $sendmail_dest
38
    save_list=!append item $wims_site_manager to $save_list
39
  !endif
18120 bpr 40
  save_list=!listuniq $save_list
15421 bpr 41
  save_subject=!char 1 to 100 of $sendmail_subject
42
  save_msg=!char 1 to 1000 of $sendmail_msg
43
  !if $sendmail_subject=$empty or $sendmail_msg=$empty
44
    error=bad_mail
45
    step=$empty
46
  !endif
47
  !if $save_list=$empty
48
    error=bad_list
49
    step=$empty
50
  !endif
51
  !exit
2977 guerimand 52
!endif
53
 
54
!if $step=2
7181 bpr 55
  !for us in $save_list
8372 bpr 56
 
57
!! the blank line is compulsory
15488 obado 58
    !mailto $us\
59
$wims_site_manager\
7181 bpr 60
[WIMS $wims_servername] $save_subject\
8372 bpr 61
$save_msg\
7181 bpr 62
 
8372 bpr 63
 
7181 bpr 64
  !next us
2845 guerimand 65
!endif