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