--- loncom/interface/lonfeedback.pm 2004/08/17 14:27:19 1.116
+++ loncom/interface/lonfeedback.pm 2004/08/31 22:27:10 1.122
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Feedback
#
-# $Id: lonfeedback.pm,v 1.116 2004/08/17 14:27:19 raeburn Exp $
+# $Id: lonfeedback.pm,v 1.122 2004/08/31 22:27:10 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -41,13 +41,13 @@ use Apache::lonspeller();
use Cwd;
sub discussion_open {
- my ($status)=@_;
+ my ($status,$symb)=@_;
if (defined($status) &&
!($status eq 'CAN_ANSWER' || $status eq 'CANNOT_ANSWER'
|| $status eq 'OPEN')) {
return 0;
}
- my $close=&Apache::lonnet::EXT('resource.0.discussend');
+ my $close=&Apache::lonnet::EXT('resource.0.discussend',$symb);
if (defined($close) && $close ne '' && $close < time) {
return 0;
}
@@ -59,7 +59,7 @@ sub discussion_visible {
if (not &discussion_open($status)) {
my $hidden=&Apache::lonnet::EXT('resource.0.discusshide');
if (lc($hidden) eq 'yes' or $hidden eq '' or !defined($hidden)) {
- return 0;
+ if (!$ENV{'request.role.adv'}) { return 0; }
}
}
return 1;
@@ -446,11 +446,11 @@ imscp_v1p1.xsd http://www.imsglobal.org/
$alldiscussion{$_} = $_;
}
unless ( ($notshown{$alldiscussion{$_}} eq '1') || ($shown{$alldiscussion{$_}} == 0) ) {
- unless ($outputtarget eq 'tex' && $outputtarget eq 'export') {
+ if ($outputtarget ne 'tex' && $outputtarget ne 'export') {
$discussion.="\n
";
}
my $thisdepth=$depth[$alldiscussion{$_}];
- unless ($outputtarget eq 'tex' || $outputtarget eq 'export') {
+ if ($outputtarget ne 'tex' && $outputtarget ne 'export') {
for (1..$thisdepth) {
$discussion.=' | ';
}
@@ -626,7 +626,8 @@ END
$attachnum += @currnewattach;
}
}
- $discussion.=(<
@@ -665,6 +666,7 @@ ENDDISCUSS
$discussion.=$newattachmsg;
$discussion.=&generate_preview_button();
}
+ }
} else {
if (&discussion_open($status) &&
&Apache::lonnet::allowed('pch',
@@ -1355,7 +1357,7 @@ $htmlheader
}
if (rec) {
- if (typeof(document.mailform.onsubmit)!='undefined') {
+ if (typeof(document.mailform.onsubmit)=='function') {
document.mailform.onsubmit();
}
document.mailform.submit();
@@ -1977,45 +1979,6 @@ sub get_post_attachments {
return;
}
-sub build_ims_export {
- my ($r,$symb,$previous,$feedurl) = @_;
- # backward compatibility (bulletin boards used to be 'wrapped')
- if ($feedurl=~m|^/adm/wrapper/adm/.*/bulletinboard$|) {
- $feedurl=~s|^/adm/wrapper||;
- }
- my %contrib=&Apache::lonnet::restore($symb,$ENV{'request.course.id'},
- $ENV{'course.'.$ENV{'request.course.id'}.'.domain'},
- $ENV{'course.'.$ENV{'request.course.id'}.'.num'});
- my @depth=();
- my %alldiscussion=();
- my @discussionitems=();
- my %usernamesort = ();
- my %subjectsort = ();
- my %namesort = ();
- my %notshown = ();
- my %newitem = ();
- my %dischash = ();
- my %shown = ();
- my %roleinfo = ();
- my @posters=();
- my $maxdepth=0;
- my $visible=0;
- my $newpostsflag=0;
- my $status;
- my $viewgrades;
- my $seeid;
- my $prevread;
- my $sortposts;
- my $ressymb;
- my $target;
- my $readkey;
- my $showunmark;
- my $showonlyunread;
-
-}
-
-
-
sub fail_redirect {;
my ($r,$feedurl) = @_;
if ($feedurl=~/^\/adm\//) { $feedurl.='?register=1' };
@@ -2028,6 +1991,7 @@ sub fail_redirect {;
Sorry, no recipients ...
+
Continue