--- loncom/interface/lonfeedback.pm 2006/12/09 16:07:34 1.234
+++ loncom/interface/lonfeedback.pm 2006/12/27 02:45:41 1.238
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Feedback
#
-# $Id: lonfeedback.pm,v 1.234 2006/12/09 16:07:34 raeburn Exp $
+# $Id: lonfeedback.pm,v 1.238 2006/12/27 02:45:41 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -100,7 +100,8 @@ sub list_discussion {
}
}
- my ($blocked,$blocktext) = &blocking_posts('boards',1);
+ my ($blocked,$blocktext) =
+ &Apache::loncommon::blocking_status('boards');
if ($blocked) {
&Apache::lonenc::check_encrypt(\$ressymb);
if ($mode ne 'board') {
@@ -823,25 +824,6 @@ sub action_links_bar {
return $discussion;
}
-sub blocking_posts {
- my ($type,$showstatus) = @_;
- my %setters;
- my ($blocked,$output);
- my ($startblock,$endblock) =
- &Apache::loncommon::blockcheck(\%setters,$type);
- if ($startblock && $endblock) {
- $blocked = 1;
- if ($showstatus) {
- my $showstart = &Apache::lonlocal::locallocaltime($startblock);
- my $showend = &Apache::lonlocal::locallocaltime($endblock);
- $output = '
'.&mt('Discussion postings will not be viewable for resources in this course between [_1] and [_2] because communication is being blocked.',$showstart, $showend).'
'.
- &Apache::loncommon::build_block_table($startblock,$endblock,
- \%setters);
- }
- }
- return ($blocked,$output);
-}
-
sub postingform_display {
my ($mode,$ressymb,$now,$subject,$comment,$outputtarget,$attachnum,
$currnewattach,$currdelold,$group) = @_;
@@ -878,7 +860,7 @@ ENDDISCUSS
if ($group ne '') {
$postingform .='';
}
- my ($blockblog) = &blocking_posts('blogs');
+ my $blockblog = &Apache::loncommon::blocking_status('blogs');
if (!$blockblog) {
$postingform .= &add_blog_checkbox();
}
@@ -1486,7 +1468,7 @@ sub replicate_attachments {
}
sub mail_screen {
- my ($r,$feedurl,$options) = @_;
+ my ($r,$feedurl,$options,$symb) = @_;
if (exists($env{'form.origpage'})) {
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['subject','comment','currnewattach','addnewattach','deloldattach','delnewattach','timestamp','idx','anondiscuss','discuss','blog','group','ref']);
}
@@ -1497,9 +1479,8 @@ sub mail_screen {
'title' => 'Title',
'reta' => 'Retained attachments',
'atta' => 'Attachment (128 KB max size)',
- );
- my $title=&Apache::lonnet::gettitle($feedurl);
- if (!$title) { $title = $feedurl; }
+ );
+ my $restitle = &get_resource_title($symb,$feedurl);
my $quote='';
my $subject = '';
my $comment = '';
@@ -1687,7 +1668,7 @@ END
$r->print(<$title
+$restitle