[system] / branches / rel-2-3-dev / webwork2 / lib / WeBWorK / ContentGenerator / Instructor / SendMail.pm Repository:
ViewVC logotype

Diff of /branches/rel-2-3-dev/webwork2/lib/WeBWorK/ContentGenerator/Instructor/SendMail.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 2785 Revision 2786
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.35 2004/06/24 18:08:43 dpvc Exp $ 4# $CVSHeader: webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/SendMail.pm,v 1.36 2004/09/14 18:55:58 apizer 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.
684 my @tmp2; 684 my @tmp2;
685 eval{ @tmp2= @{$rh_merge_data->{ $db->getUser($preview_user)->student_id } };}; # checked 685 eval{ @tmp2= @{$rh_merge_data->{ $db->getUser($preview_user)->student_id } };}; # checked
686 if ($@ and $merge_file ne 'None') { 686 if ($@ and $merge_file ne 'None') {
687 print "No merge data for $preview_user in merge file: <$merge_file>",CGI::br(); 687 print "No merge data for $preview_user in merge file: <$merge_file>",CGI::br();
688 } else { 688 } else {
689 print CGI::pre("",data_format(0..($#tmp2)),"<br>", data_format2(@tmp2)); 689 print CGI::pre("",data_format(1..($#tmp2+1)),"<br>", data_format2(@tmp2));
690 } 690 }
691#create a textbox with the subject and a textarea with the message 691#create a textbox with the subject and a textarea with the message
692#print actual body of message 692#print actual body of message
693 693
694 print "\n", CGI::p( $self->{message}) if defined($self->{message}); 694 print "\n", CGI::p( $self->{message}) if defined($self->{message});
834 $msg =~ s/(\$SECTION)/eval($1)/ge; 834 $msg =~ s/(\$SECTION)/eval($1)/ge;
835 $msg =~ s/(\$RECITATION)/eval($1)/ge; 835 $msg =~ s/(\$RECITATION)/eval($1)/ge;
836 $msg =~ s/(\$EMAIL)/eval($1)/ge; 836 $msg =~ s/(\$EMAIL)/eval($1)/ge;
837 $msg =~ s/(\$LOGIN)/eval($1)/ge; 837 $msg =~ s/(\$LOGIN)/eval($1)/ge;
838# $msg =~ s/\$COL\[ *-/\$COL\[$endCol-/g; ## Perl handles negative indexes correctly, so there is no need to do this 838# $msg =~ s/\$COL\[ *-/\$COL\[$endCol-/g; ## Perl handles negative indexes correctly, so there is no need to do this
839 $msg =~ s/(\$COL\[.*?\])/eval($1)/ge if defined($COL[1]); # prevents extraneous error messages. 839 $msg =~ s/\$COL\[(\-?\d+)\]/$COL[$1]/ge if defined($COL[1]); # prevents extraneous error messages.
840 840
841 $msg =~ s/\r//g; 841 $msg =~ s/\r//g;
842 842
843 my @preview_COL = @COL; 843 my @preview_COL = @COL;
844 shift @preview_COL; ## shift back for preview 844 shift @preview_COL; ## shift back for preview

Legend:
Removed from v.2785  
changed lines
  Added in v.2786

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9