--- loncom/interface/lonfeedback.pm 2005/04/07 06:56:23 1.157
+++ loncom/interface/lonfeedback.pm 2005/09/20 07:52:03 1.168
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Feedback
#
-# $Id: lonfeedback.pm,v 1.157 2005/04/07 06:56:23 albertel Exp $
+# $Id: lonfeedback.pm,v 1.168 2005/09/20 07:52:03 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -97,7 +97,7 @@ sub list_discussion {
$ressymb=&wrap_symb($ressymb);
my $encsymb=&Apache::lonenc::check_encrypt($ressymb);
my $viewgrades=(&Apache::lonnet::allowed('vgr',$crs)
- && ($ressymb=~/\.(problem|exam|quiz|assess|survey|form)$/));
+ && ($ressymb=~/\.(problem|exam|quiz|assess|survey|form|task)$/));
my %usernamesort = ();
my %namesort =();
@@ -858,7 +858,7 @@ sub build_posting_display {
$contrib{$idx.':sendername'}.' at '.
$contrib{$idx.':senderdomain'}.')';
if ($contrib{$idx.':anonymous'}) {
- $sender.=' ['.&mt('anonymous').'] '.
+ $sender.=' ['.&mt('anonymous').'] '.
$screenname;
}
@@ -1205,7 +1205,7 @@ sub get_post_contents {
my ($timesent,$attachmsg);
my %currattach = ();
$timesent = &Apache::lonlocal::locallocaltime($postversions[$i]);
- $$messages{$i}=~s/\n/\
/g;
+ &newline_to_br(\$messages->{$i});
$$messages{$i}=&Apache::lontexconvert::msgtexconverted($$messages{$i});
$$subjects{$i}=~s/\n/\
/g;
$$subjects{$i}=&Apache::lontexconvert::msgtexconverted($$subjects{$i});
@@ -1375,7 +1375,7 @@ END
&get_post_versions(\%msgversions,$contrib{$idx.':message'},0,$numoldver);
$message = $msgversions{$numoldver};
}
- $message=~s/\n/\
/g;
+ &newline_to_br(\$message);
$quote='
'.&Apache::lontexconvert::msgtexconverted($message).''; if ($idx > 0) { my %subversions = (); @@ -2259,7 +2259,7 @@ sub screen_header { my $msgoptions=''; my $discussoptions=''; unless (($env{'form.replydisc'}) || ($env{'form.editdisc'})) { - if (($feedurl=~/^\/res\//) && ($feedurl!~/^\/res\/adm/)) { + if (($feedurl=~/^\/res\//) && ($feedurl!~/^\/res\/adm/) && ($env{'user.adv'})) { $msgoptions= ''; @@ -2375,17 +2375,48 @@ sub secapply { return ''; } +=pod + +=over 4 + +=item * + +decide_receiver($feedurl,$author,$question,$course,$policy,$defaultflag); + +Arguments + $feedurl - /res/ url of resource (only need if $author is true) + $author,$question,$course,$policy - all true/false parameters + if true will attempt to find the addresses of user that should receive + this type of feedback (author - feedback to author of resource $feedurl, + $question 'Resource Content Questions', $course 'Course Content Question', + $policy 'Course Policy') + (Additionally it also checks $env for whether the corresponding form.