--- loncom/interface/lonfeedback.pm 2005/11/15 20:33:20 1.174
+++ loncom/interface/lonfeedback.pm 2006/03/19 21:43:21 1.186
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Feedback
#
-# $Id: lonfeedback.pm,v 1.174 2005/11/15 20:33:20 albertel Exp $
+# $Id: lonfeedback.pm,v 1.186 2006/03/19 21:43:21 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -39,6 +39,7 @@ use Apache::lonnet;
use Apache::lonhtmlcommon();
use Apache::lonnavmaps;
use Apache::lonenc();
+use Apache::lonrss();
use HTML::LCParser();
use Apache::lonspeller();
use Cwd;
@@ -905,16 +906,16 @@ sub build_posting_display {
} else {
@{$$namesort{$lastname}{$firstname}} = ("$idx");
}
- if ($env{'course.'.$env{'request.course.id'}.'.allow_discussion_post_editing'} =~ m/yes/i) {
+ if (&editing_allowed()) {
if (($env{'user.domain'} eq $contrib{$idx.':senderdomain'}) && ($env{'user.name'} eq $contrib{$idx.':sendername'})) {
$sender.=' '.&mt('Edit').'';
unless ($seeid) {
- $sender.=" ';
}
}
@@ -924,22 +925,22 @@ sub build_posting_display {
unless ($studenthidden) {
$sender.=' '.&mt('Make Visible').'';
}
} else {
$sender.=' '.&mt('Hide').'';
}
$sender.=' '.&mt('Delete').'';
@@ -975,8 +976,8 @@ sub build_posting_display {
($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:''))) {
$sender.=' '.&mt('Reply').'';
}
@@ -1300,10 +1301,9 @@ sub replicate_attachments {
sub mail_screen {
my ($r,$feedurl,$options) = @_;
if (exists($env{'form.origpage'})) {
- &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['subject','comment','currnewattach','addnewattach','deloldattach','delnewattach','timestamp','idx','anondiscuss','discuss']);
+ &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['subject','comment','currnewattach','addnewattach','deloldattach','delnewattach','timestamp','idx','anondiscuss','discuss','blog']);
}
- my $bodytag=&Apache::loncommon::bodytag('Resource Feedback and Discussion',
- '','onLoad="window.focus();setposttype();"');
+
my $title=&Apache::lonnet::gettitle($feedurl);
if (!$title) { $title = $feedurl; }
my $quote='';
@@ -1441,15 +1441,8 @@ END
&process_attachments(\@currnewattach,\@currdelold,\@keepold);
}
my $latexHelp=&Apache::loncommon::helpLatexCheatsheet();
- my $htmlheader=&Apache::lonhtmlcommon::htmlareaheaders();
my $send=&mt('Send');
- my $html=&Apache::lonxml::xmlbegin();
- $r->print(<
-The LearningOnline Network with CAPA
-
-$htmlheader
+ my $js= <
//
-
-$bodytag
+END
+
+ my $onload = 'onLoad="window.focus();setposttype();"';
+ my $start_page=
+ &Apache::loncommon::start_page('Resource Feedback and Discussion',$js,
+ {'add_entries' => $onload});
+
+ $r->print(<$title