| 1 | ################################################################################ |
1 | ################################################################################ |
| 2 | # WeBWorK Online Homework Delivery System |
2 | # WeBWorK Online Homework Delivery System |
| 3 | # Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ |
3 | # Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ |
| 4 | # $CVSHeader: webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/SendMail.pm,v 1.33 2004/05/24 18:05:26 mschmitt Exp $ |
4 | # $CVSHeader: webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/SendMail.pm,v 1.34 2004/06/15 20:43:53 toenail Exp $ |
| 5 | # |
5 | # |
| 6 | # This program is free software; you can redistribute it and/or modify it under |
6 | # This program is free software; you can redistribute it and/or modify it under |
| 7 | # the terms of either: (a) the GNU General Public License as published by the |
7 | # the terms of either: (a) the GNU General Public License as published by the |
| 8 | # Free Software Foundation; either version 2, or (at your option) any later |
8 | # Free Software Foundation; either version 2, or (at your option) any later |
| 9 | # version, or (b) the "Artistic License" which comes with this package. |
9 | # version, or (b) the "Artistic License" which comes with this package. |
| … | |
… | |
| 64 | #FIXME get these values from global course environment (see subroutines as well) |
64 | #FIXME get these values from global course environment (see subroutines as well) |
| 65 | my $default_msg_file = 'default.msg'; |
65 | my $default_msg_file = 'default.msg'; |
| 66 | my $old_default_msg_file = 'old_default.msg'; |
66 | my $old_default_msg_file = 'old_default.msg'; |
| 67 | |
67 | |
| 68 | |
68 | |
|
|
69 | # get user record |
|
|
70 | my $ur = $self->{db}->getUser($user); |
|
|
71 | |
| 69 | # store data |
72 | # store data |
| 70 | $self->{defaultFrom} = 'FIXME from'; |
73 | $self->{defaultFrom} = $ur->email_address . " (".$ur->first_name." ".$ur->last_name.")"; |
| 71 | $self->{defaultReply} = 'FIXME reply'; |
74 | $self->{defaultReply} = $ur->email_address; |
|
|
75 | $self->{defaultSubject} = $self->r->urlpath->arg("courseID") . " notice"; |
|
|
76 | |
| 72 | $self->{rows} = (defined($r->param('rows'))) ? $r->param('rows') : $ce->{mail}->{editor_window_rows}; |
77 | $self->{rows} = (defined($r->param('rows'))) ? $r->param('rows') : $ce->{mail}->{editor_window_rows}; |
| 73 | $self->{columns} = (defined($r->param('columns'))) ? $r->param('columns') : $ce->{mail}->{editor_window_columns}; |
78 | $self->{columns} = (defined($r->param('columns'))) ? $r->param('columns') : $ce->{mail}->{editor_window_columns}; |
| 74 | $self->{default_msg_file} = $default_msg_file; |
79 | $self->{default_msg_file} = $default_msg_file; |
| 75 | $self->{old_default_msg_file} = $old_default_msg_file; |
80 | $self->{old_default_msg_file} = $old_default_msg_file; |
| 76 | $self->{merge_file} = (defined($r->param('merge_file' ))) ? $r->param('merge_file') : 'None'; |
81 | $self->{merge_file} = (defined($r->param('merge_file' ))) ? $r->param('merge_file') : 'None'; |
| … | |
… | |
| 757 | |
762 | |
| 758 | } else { |
763 | } else { |
| 759 | $from = $self->{defaultFrom}; |
764 | $from = $self->{defaultFrom}; |
| 760 | $replyTo = $self->{defaultReply}; |
765 | $replyTo = $self->{defaultReply}; |
| 761 | $text = (-e "$filePath") ? "FIXME file $filePath can't be read" :"FIXME file $filePath doesn't exist"; |
766 | $text = (-e "$filePath") ? "FIXME file $filePath can't be read" :"FIXME file $filePath doesn't exist"; |
| 762 | $subject = "FIXME default subject"; |
767 | $subject = $self->{defaultSubject}; |
| 763 | } |
768 | } |
| 764 | return ($from, $replyTo, $subject, \$text); |
769 | return ($from, $replyTo, $subject, \$text); |
| 765 | } |
770 | } |
| 766 | |
771 | |
| 767 | |
772 | |