Subversion Repositories wimsdev

Rev

Rev 17180 | Rev 18582 | 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
17276 guerimand 35
!mailto $(u[4])\
16581 guerimand 36
$sender\
16512 guerimand 37
[WIMS $wims_classname] $save_subject\
17276 guerimand 38
***\
39
$name_sendby ($(name_suptype[$supervisortype]))\
40
***\
16512 guerimand 41
$save_msg\
16582 guerimand 42
$noreply1\
16479 guerimand 43
 
44
  !reset u
45
!next l_
46
 
47
 
16482 guerimand 48
!! --------- preparing msg for teacher and supervisor
16479 guerimand 49
nbuser=!recordcnt wimshome/log/classes/$wims_class/.userlist
50
!if $nbuser>$cnt
16512 guerimand 51
  msgmod=$save_msg\
17180 bpr 52
<br>\
53
#######<br>\
54
$(name_sendto[1]) : $username<br>\
55
#######<br>\
56
<br>
16479 guerimand 57
 
58
!else
16512 guerimand 59
  msgmod=$save_msg
16479 guerimand 60
!endif
16482 guerimand 61
 
62
!if $save_sendotherteacher=1
63
  !! ----------- send copie msg to teacher of the class
64
  cnt_teacher=!recordcnt wimshome/sessions/$wims_session/.userteacher_mail
65
  !for l_ =1 to $cnt_teacher
66
    u=!record $l_ of wimshome/sessions/$wims_session/.userteacher_mail
67
    login=!append item $(u[3]) to $login
68
    teachername=!append item $(u[1]) $(u[2]) to $teachername
69
    !mailto $(u[4])\
16581 guerimand 70
$sender\
16512 guerimand 71
[WIMS $wims_classname] $save_subject\
17276 guerimand 72
***\
73
$name_sendby ($(name_suptype[$supervisortype]))\
74
***\
16479 guerimand 75
$msgmod\
16582 guerimand 76
$noreply1\
16479 guerimand 77
 
16582 guerimand 78
 
16482 guerimand 79
    !reset u
80
  !next l_
81
!endif
16479 guerimand 82
 
16482 guerimand 83
!if $save_selfsend=1
84
  !! ----------- send copie msg to supervisor of the class
85
  !if $cnt_teacher>0 and $save_sendotherteacher=1
16512 guerimand 86
    msgmod=$save_msg\
17180 bpr 87
<br><br>\
88
#######<br>\
89
$(name_sendto[2]) : $teachername<br>\
90
#######<br>
16479 guerimand 91
 
16482 guerimand 92
  !endif
93
  login=!append item supervisor to $login
16802 guerimand 94
    !mailto $supervisormail\
16581 guerimand 95
$sender\
16512 guerimand 96
[WIMS $wims_classname] $save_subject\
17276 guerimand 97
***\
98
$name_sendby ($(name_suptype[$supervisortype]))\
99
***\
16482 guerimand 100
$msgmod\
16582 guerimand 101
$noreply2\
16482 guerimand 102
 
103
!endif
104
 
16512 guerimand 105
!set wims_module_log=class $class: sendmail
16479 guerimand 106
date=!translate : to . in $wims_now
107
!appendfile wimshome/log/classes/$wims_class/.log $date $httpd_REMOTE_ADDR	$supervisormail send mail to $login
108
 
16512 guerimand 109
!reset sending_mail method select_user loginlist