Rev 16802 | Rev 17276 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
16479 | guerimand | 1 | |
2 | cnt_user=!itemcnt $sending_mail |
||
16482 | guerimand | 3 | !reset username teachername login teachername |
16581 | guerimand | 4 | |
5 | !! don't send supervisor mail in case of wims_mail_hidden=yes |
||
6 | !if $wims_mail_hidden=yes |
||
7 | sender=$empty |
||
16582 | guerimand | 8 | !if $wims_superclass=$empty |
9 | localclass=$wims_class |
||
10 | !else |
||
11 | localclass=$wims_superclass |
||
12 | !endif |
||
13 | localtype=authparticipant |
||
14 | noreply1=\ |
||
15 | \ |
||
16 | $name_noreply |
||
17 | !if $wims_realuser=supervisor |
||
18 | localtype=authsupervisor |
||
19 | noreply2=\ |
||
20 | \ |
||
21 | $name_noreply |
||
22 | !else |
||
23 | noreply2=$noreply1 |
||
24 | !endif |
||
16581 | guerimand | 25 | !else |
26 | sender=$supervisormail |
||
16582 | guerimand | 27 | noreply1=$empty |
28 | noreply2=$empty |
||
16581 | guerimand | 29 | !endif |
30 | |||
16479 | guerimand | 31 | !for l_ =1 to $cnt_user |
32 | u=!record $l_ of wimshome/sessions/$wims_session/.userlist_mail |
||
33 | username=!append item $(u[1]) $(u[2]) to $username |
||
34 | login=!append item $(u[3]) to $login |
||
35 | !mailto $(u[4])\ |
||
16581 | guerimand | 36 | $sender\ |
16512 | guerimand | 37 | [WIMS $wims_classname] $save_subject\ |
38 | $save_msg\ |
||
16582 | guerimand | 39 | $noreply1\ |
16479 | guerimand | 40 | |
41 | !reset u |
||
42 | !next l_ |
||
43 | |||
44 | |||
16482 | guerimand | 45 | !! --------- preparing msg for teacher and supervisor |
16479 | guerimand | 46 | nbuser=!recordcnt wimshome/log/classes/$wims_class/.userlist |
47 | !if $nbuser>$cnt |
||
16512 | guerimand | 48 | msgmod=$save_msg\ |
17180 | bpr | 49 | <br>\ |
50 | #######<br>\ |
||
51 | $(name_sendto[1]) : $username<br>\ |
||
52 | #######<br>\ |
||
53 | <br> |
||
16479 | guerimand | 54 | |
55 | !else |
||
16512 | guerimand | 56 | msgmod=$save_msg |
16479 | guerimand | 57 | !endif |
16482 | guerimand | 58 | |
59 | !if $save_sendotherteacher=1 |
||
60 | !! ----------- send copie msg to teacher of the class |
||
61 | cnt_teacher=!recordcnt wimshome/sessions/$wims_session/.userteacher_mail |
||
62 | !for l_ =1 to $cnt_teacher |
||
63 | u=!record $l_ of wimshome/sessions/$wims_session/.userteacher_mail |
||
64 | login=!append item $(u[3]) to $login |
||
65 | teachername=!append item $(u[1]) $(u[2]) to $teachername |
||
66 | !mailto $(u[4])\ |
||
16581 | guerimand | 67 | $sender\ |
16512 | guerimand | 68 | [WIMS $wims_classname] $save_subject\ |
16479 | guerimand | 69 | $msgmod\ |
16582 | guerimand | 70 | $noreply1\ |
16479 | guerimand | 71 | |
16582 | guerimand | 72 | |
16482 | guerimand | 73 | !reset u |
74 | !next l_ |
||
75 | !endif |
||
16479 | guerimand | 76 | |
16482 | guerimand | 77 | !if $save_selfsend=1 |
78 | !! ----------- send copie msg to supervisor of the class |
||
79 | !if $cnt_teacher>0 and $save_sendotherteacher=1 |
||
16512 | guerimand | 80 | msgmod=$save_msg\ |
17180 | bpr | 81 | <br><br>\ |
82 | #######<br>\ |
||
83 | $(name_sendto[2]) : $teachername<br>\ |
||
84 | #######<br> |
||
16479 | guerimand | 85 | |
16482 | guerimand | 86 | !endif |
87 | login=!append item supervisor to $login |
||
16802 | guerimand | 88 | !mailto $supervisormail\ |
16581 | guerimand | 89 | $sender\ |
16512 | guerimand | 90 | [WIMS $wims_classname] $save_subject\ |
16482 | guerimand | 91 | $msgmod\ |
16582 | guerimand | 92 | $noreply2\ |
16482 | guerimand | 93 | |
94 | !endif |
||
95 | |||
16512 | guerimand | 96 | !set wims_module_log=class $class: sendmail |
16479 | guerimand | 97 | date=!translate : to . in $wims_now |
98 | !appendfile wimshome/log/classes/$wims_class/.log $date $httpd_REMOTE_ADDR $supervisormail send mail to $login |
||
99 | |||
16512 | guerimand | 100 | !reset sending_mail method select_user loginlist |