version 1.385, 2006/12/13 18:43:30
|
version 1.386, 2007/01/04 14:59:57
|
Line 39 use Apache::loncoursedata;
|
Line 39 use Apache::loncoursedata;
|
use Apache::lonmsg(); |
use Apache::lonmsg(); |
use Apache::Constants qw(:common); |
use Apache::Constants qw(:common); |
use Apache::lonlocal; |
use Apache::lonlocal; |
|
use Apache::lonenc; |
use String::Similarity; |
use String::Similarity; |
use lib '/home/httpd/lib/perl'; |
use lib '/home/httpd/lib/perl'; |
use LONCAPA; |
use LONCAPA; |
Line 2116 sub processHandGrade {
|
Line 2117 sub processHandGrade {
|
} |
} |
my $includemsg = $env{'form.includemsg'.$ctr}; |
my $includemsg = $env{'form.includemsg'.$ctr}; |
my ($subject,$message,$msgstatus) = ('','',''); |
my ($subject,$message,$msgstatus) = ('','',''); |
|
my $restitle = &Apache::lonnet::gettitle($symb); |
|
my $encrypturl=&Apache::lonnet::EXT('resource.0.encrypturl', |
|
$symb,$udom,$uname); |
|
my ($feedurl,$baseurl,$showsymb,$messagetail); |
|
$feedurl = &Apache::lonnet::clutter($url); |
|
if ($encrypturl =~ /^yes$/i) { |
|
$baseurl = &Apache::lonenc::encrypted($feedurl,1); |
|
$showsymb = &Apache::lonenc::encrypted($symb,1); |
|
} |
if ($includemsg =~ /savemsg|newmsg\Q$ctr\E/) { |
if ($includemsg =~ /savemsg|newmsg\Q$ctr\E/) { |
$subject = $env{'form.msgsub'} if ($includemsg =~ /msgsub/); |
$subject = $env{'form.msgsub'} if ($includemsg =~ /msgsub/); |
unless ($subject=~/\w/) { $subject=&mt('Grading Feedback'); } |
unless ($subject=~/\w/) { $subject=&mt('Grading Feedback'); } |
$subject.=' ['.&Apache::lonnet::declutter($url).']'; |
$subject.=' ['.$restitle.']'; |
my (@msgnum) = split(/,/,$includemsg); |
my (@msgnum) = split(/,/,$includemsg); |
foreach (@msgnum) { |
foreach (@msgnum) { |
$message.=$env{'form.'.$_} if ($_ =~ /savemsg|newmsg/ && $_ ne ''); |
$message.=$env{'form.'.$_} if ($_ =~ /savemsg|newmsg/ && $_ ne ''); |
Line 2127 sub processHandGrade {
|
Line 2137 sub processHandGrade {
|
$message =&Apache::lonfeedback::clear_out_html($message); |
$message =&Apache::lonfeedback::clear_out_html($message); |
if ($env{'form.withgrades'.$ctr}) { |
if ($env{'form.withgrades'.$ctr}) { |
$message.="\n\nPoint".($pts > 1 ? 's':'').' awarded = '.$pts.' out of '.$wgt; |
$message.="\n\nPoint".($pts > 1 ? 's':'').' awarded = '.$pts.' out of '.$wgt; |
$message.=" for <a href=\"". |
$messagetail = " for <a href=\"". |
&Apache::lonnet::clutter($url). |
$baseurl."?symb=$showsymb\">$env{'form.probTitle'}</a>"; |
"?symb=$symb\">$env{'form.probTitle'}</a>"; |
} |
} |
$msgstatus = |
$msgstatus = &Apache::lonmsg::user_normal_msg($uname,$udom, |
&Apache::lonmsg::user_normal_msg($uname,$udom,$subject, |
$subject, |
$message.$messagetail, |
$message); |
undef,$baseurl,undef, |
$request->print('<br />'.&mt('Sending message to [_1]@[_2]',$uname,$udom).': '. |
undef,undef,$showsymb, |
|
$restitle); |
|
$request->print('<br />'.&mt('Sending message to [_1]:[_2]',$uname,$udom).': '. |
$msgstatus); |
$msgstatus); |
} |
} |
if ($env{'form.collaborator'.$ctr}) { |
if ($env{'form.collaborator'.$ctr}) { |
Line 2150 sub processHandGrade {
|
Line 2162 sub processHandGrade {
|
next; |
next; |
} else { |
} else { |
if ($message ne '') { |
if ($message ne '') { |
$msgstatus = &Apache::lonmsg::user_normal_msg($collaborator,$udom,$subject,$message); |
$encrypturl= |
|
&Apache::lonnet::EXT('resource.0.encrypturl', |
|
$symb,$udom,$collaborator); |
|
if ($encrypturl =~ /^yes$/i) { |
|
$baseurl = &Apache::lonenc::encrypted($feedurl,1); |
|
$showsymb = &Apache::lonenc::encrypted($symb,1); |
|
} else { |
|
$baseurl = $feedurl; |
|
$showsymb = $symb; |
|
} |
|
if ($env{'form.withgrades'.$ctr}) { |
|
$messagetail = " for <a href=\"". |
|
$baseurl."?symb=$showsymb\">$env{'form.probTitle'}</a>"; |
|
|
|
} |
|
$msgstatus = |
|
&Apache::lonmsg::user_normal_msg($collaborator,$udom,$subject,$message.$messagetail,undef,$baseurl,undef,undef,undef,$showsymb,$restitle); |
} |
} |
} |
} |
} |
} |
Line 2506 sub handback_files {
|
Line 2534 sub handback_files {
|
$message .= ' The returned file(s) are named: '. $file_msg; |
$message .= ' The returned file(s) are named: '. $file_msg; |
$message .= " and can be found in your portfolio space."; |
$message .= " and can be found in your portfolio space."; |
my $url = (&Apache::lonnet::decode_symb($symb))[2]; |
my $url = (&Apache::lonnet::decode_symb($symb))[2]; |
$url = &Apache::lonnet::declutter($url); |
my $feedurl = &Apache::lonnet::declutter($url); |
my $msgstatus = &Apache::lonmsg::user_normal_msg($stuname,$domain, |
my $encrypturl=&Apache::lonnet::EXT('resource.0.encrypturl', |
$subject.' (File Returned) ['.$url.']',$message); |
$symb,$domain,$stuname); |
|
my ($baseurl,$showsymb); |
|
if ($encrypturl =~ /^yes$/i) { |
|
$baseurl = &Apache::lonenc::encrypted($feedurl,1); |
|
$showsymb = &Apache::lonenc::encrypted($symb,1); |
|
} else { |
|
$baseurl = $feedurl; |
|
$showsymb = $symb; |
|
} |
|
my $restitle = &Apache::lonnet::gettitle($symb); |
|
my $msgstatus = |
|
&Apache::lonmsg::user_normal_msg($stuname,$domain,$subject. |
|
' (File Returned) ['.$restitle.']',$message,undef, |
|
$baseurl,undef,undef,undef,$showsymb,$restitle); |
} |
} |
} |
} |
return; |
return; |