Subversion Repositories wimsdev

Rev

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