Subversion Repositories wimsdev

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
16479 guerimand 1
 
2
!! ------ check method
3
!bound method within all,select,login,filter default all
4
 
5
all_list=!values v for v=1 to $nb_user
6
!if $method=all
7
  sending_mail=$all_list
8
!endif
9
 
10
!if $method=select
11
  sending_mail=!listintersect $all_list and $select_user
12
!endif
13
 
14
!if $method=filter
15
  !reset sending_mail sending_nomail
16
  !for lu=1 to $nb_user
17
    us=!record $lu of wimshome/sessions/$wims_session/.userlist_mail
18
    !distribute item $us_ into l_name_,f_name_,login
19
    !read adm/vfilter/testfilter $(us[3])\
20
$varfilter_
21
    !if $var_filter_test=1
22
      sending_mail=!append item $lu to $sending_mail
23
    !endif
24
  !next lu
25
  nbbad=0
26
  !if $nbw_user>0
27
    !for lu=1 to $nbw_user
28
      us=!record $lu of wimshome/sessions/$wims_session/.userlist_nomail
29
      !distribute item $us_ into l_name_,f_name_,login
30
      !read adm/vfilter/testfilter $(us[3])\
31
$varfilter_
32
      !if $var_filter_test=1
33
        sending_nomail=!append item $lu to $sending_nomail
34
        !increase nbbad
35
      !endif
36
    !next lu
37
  !endif
38
!endif
39
 
40
!if $method=login
41
  !reset sending_mail valid_login
42
  !for lu=1 to $nb_user
43
    us=!record $lu of wimshome/sessions/$wims_session/.userlist_mail
44
    !distribute item $us into l_name_,f_name_,login
45
    !if $login isitemof $loginlist
46
      sending_mail=!append item $lu to $sending_mail
47
      valid_login=!append item $login to $valid_login
48
    !endif
49
  !next lu
50
  bad_list=!listcomplement $valid_login in $loginlist
51
  nbbad=!itemcnt $bad_list
52
!endif
53
 
54
nbsend=!itemcnt $sending_mail
55
!if $nbsend=0
56
  error=nousermail
57
  !reset job
58
  !exit
59
!endif
60
nbteacher=!recordcnt wimshome/sessions/$wims_session/.teacherlist_mail
61