'.
''.
'';
@@ -900,17 +833,7 @@ sub action_links_bar {
$discussion .= '&previous='.$prevread;
}
$discussion .= &group_args($group);
- $discussion .= '">'.&mt('Export').'';
- if ($seehidden) {
- $discussion .= ' ';
- $discussion .=''.&mt('Undelete all deleted entries').'';
- }
- $discussion.=' | ';
+ $discussion .= '">'.&mt('Export').'? ';
if ($newpostsflag) {
if (!$markondisp) {
$discussion .='\n";
$postingform .= &generate_attachments_button('',$attachnum,$ressymb,
- $now,$currnewattach,
- $currdelold,'',$mode,
- $blockblog);
+ $now,$currnewattach,
+ $currdelold,'',$mode,
+ $blockblog);
if ((ref($currnewattach) eq 'ARRAY') && (@{$currnewattach} > 0)) {
$newattachmsg = ' '.$lt{'newa'}.' ';
if (@{$currnewattach} > 1) {
- $newattachmsg .= '';
- foreach my $item (@{$currnewattach}) {
+ $newattachmsg .= '';
+ foreach my $item (@{$currnewattach}) {
$item =~ m#.*/([^/]+)$#;
$newattachmsg .= '- '.$1.'
'."\n";
- }
- $newattachmsg .= ' '."\n";
- } else {
- $$currnewattach[0] =~ m#.*/([^/]+)$#;
- $newattachmsg .= ''.$1.' '."\n";
- }
+ }
+ $newattachmsg .= ' '."\n";
+ } else {
+ $$currnewattach[0] =~ m#.*/([^/]+)$#;
+ $newattachmsg .= ''.$1.' '."\n";
+ }
}
$postingform .= $newattachmsg;
$postingform .= &generate_preview_button();
@@ -1008,31 +931,16 @@ ENDDISCUSS
}
sub build_posting_display {
- my ($usernamesort,$subjectsort,$namesort,$notshown,$newitem,$dischash,$shown,$alldiscussion,$imsitems,$imsfiles,$roleinfo,$discussionitems,$replies,$depth,$posters,$maxdepth,$visible,$newpostsflag,$current,$status,$viewgrades,$seeid,$seehidden,$canvote,$prevread,$sortposts,$ressymb,$target,$readkey,$showunmark,$showonlyunread,$totposters,$rolefilter,$sectionpick,$grouppick,$classgroups,$statusfilter,$toggkey,$outputtarget,$anonhash,$anoncnt,$group) = @_;
+ my ($usernamesort,$subjectsort,$namesort,$notshown,$newitem,$dischash,$shown,$alldiscussion,$imsitems,$imsfiles,$roleinfo,$discussionitems,$replies,$depth,$posters,$maxdepth,$visible,$newpostsflag,$current,$status,$viewgrades,$seeid,$prevread,$sortposts,$ressymb,$readkey,$showunmark,$showonlyunread,$totposters,$rolefilter,$sectionpick,$grouppick,$classgroups,$statusfilter,$toggkey,$outputtarget,$anonhash,$anoncnt,$group) = @_;
my @original=();
my @index=();
my $skip_group_check = 0;
my $symb=&Apache::lonenc::check_decrypt($ressymb);
my $escsymb=&escape($ressymb);
-# These are the discussion contributions
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 (%likes,%userlikes,%userunlikes,@theselikes,$oneplus,$twoplus,$oneminus,$twominus);
-# And these are the likes/unlikes
- my $thisuser=$env{'user.name'}.':'.$env{'user.domain'};
- if ($seeid || $canvote) {
- %likes=&Apache::lonnet::dump('disclikes',
- $env{'course.'.$env{'request.course.id'}.'.domain'},
- $env{'course.'.$env{'request.course.id'}.'.num'},
- '^'.$symb.':');
-# Array with likes to figure out averages, etc.
- @theselikes=();
-# Hashes containing likes and unlikes for this user.
- %userlikes=();
- %userunlikes=();
- }
-# Is the user allowed to see the real name behind anonymous postings?
+
my $see_anonymous =
&Apache::lonnet::allowed('rin',$env{'request.course.id'}.($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:''));
@@ -1062,56 +970,7 @@ sub build_posting_display {
($skiptest,$roleregexp,$secregexp,$statusregexp) =
&filter_regexp($rolefilter,$sectionpick,$statusfilter);
$rolematch = $roleregexp.':'.$secregexp.':'.$statusregexp;
- }
- if ($seeid || $canvote) {
-# We need to go through this twice, first to get the likes/dislikes, then to actually build the display
- for (my $id=1;$id<=$contrib{'version'};$id++) {
- my $idx=$id;
- next if ($contrib{$idx.':deleted'});
- next if ($contrib{$idx.':hidden'});
- unless ((($hiddens{$idx}) && (!$seehidden)) || ($deletions{$idx}) || (!$contrib{$idx.':message'})) {
- if ($likes{$symb.':'.$idx.':likes'} ne '') {
- push(@theselikes,$likes{$symb.':'.$idx.':likes'});
- if (ref($likes{$symb.':'.$idx.':likers'}) eq 'HASH') {
- if (exists($likes{$symb.':'.$idx.':likers'}{$thisuser})) {
- $userlikes{$idx} = 1;
- }
- }
- if (ref($likes{$symb.':'.$idx.':unlikers'}) eq 'HASH') {
- if (exists($likes{$symb.':'.$idx.':unlikers'}{$thisuser})) {
- $userunlikes{$idx} = 1;
- }
- }
- }
- }
- }
-# Figure out average likes and standard deviation if there are enough
-# discussions to warrant that
- my $ave=0;
- my $stddev=10000;
- if ($#theselikes>1) {
- my $sum=0;
- my $num=$#theselikes+1;
- foreach my $thislike (@theselikes) {
- $sum+=$thislike;
- }
- $ave=$sum/$num;
- my $sumsq=0;
- foreach my $thislike (@theselikes) {
- $sumsq+=($thislike-$ave)*($thislike-$ave);
- }
- $stddev=sqrt($sumsq/$num);
- }
-# Now we know the average likes $ave and the standard deviation $stddev
-# Get the boundaries for markup
- $oneplus=$ave+$stddev;
- $twoplus=$ave+2.*$stddev;
- $oneminus=$ave-$stddev;
- $twominus=$ave-2.*$stddev;
- }
-#
-# This is now the real loop. Go through all entries, pick up what we need
-#
+ }
for (my $id=1;$id<=$contrib{'version'};$id++) {
my $idx=$id;
next if ($contrib{$idx.':deleted'});
@@ -1144,7 +1003,7 @@ sub build_posting_display {
} else {
$$replies[$$depth[$idx]]=1;
}
- unless ((($hiddens{$idx}) && (!$seehidden)) || ($deletions{$idx})) {
+ unless ((($hiddens{$idx}) && (!$seeid)) || ($deletions{$idx})) {
$$visible++;
if ($contrib{$idx.':history'}) {
if ($contrib{$idx.':history'} =~ /:/) {
@@ -1159,7 +1018,7 @@ sub build_posting_display {
my %subjects = ();
my %attachtxt = ();
my %allattachments = ();
- my ($screenname,$plainname,$showaboutme);
+ my ($screenname,$plainname);
my $sender = &mt('Anonymous');
# Anonymous users getting number within a discussion
# Since idx is in static order, this should give the same sequence every time.
@@ -1169,7 +1028,7 @@ sub build_posting_display {
$$anonhash{$key}=&mt('Anonymous').' '.$anoncnt;
}
my ($message,$subject,$vgrlink,$ctlink);
- &get_post_contents(\%contrib,$idx,$seeid,$seehidden,$outputtarget,\%messages,\%subjects,\%allattachments,\%attachtxt,$imsfiles,\$screenname,\$plainname,\$showaboutme,$numoldver);
+ &get_post_contents(\%contrib,$idx,$seeid,$outputtarget,\%messages,\%subjects,\%allattachments,\%attachtxt,$imsfiles,\$screenname,\$plainname,$numoldver);
# Set up for sorting by subject
@@ -1199,18 +1058,12 @@ sub build_posting_display {
}
}
if (!$contrib{$idx.':anonymous'} || $see_anonymous) {
- if ($showaboutme) {
- $sender = &Apache::loncommon::aboutmewrapper(
- $plainname,
- $contrib{$idx.':sendername'},
- $contrib{$idx.':senderdomain'});
- } else {
- $sender = $plainname;
- }
- if ($see_anonymous) {
- $sender .= ' ('.$contrib{$idx.':sendername'}.':'.
- $contrib{$idx.':senderdomain'}.')';
- }
+ $sender=&Apache::loncommon::aboutmewrapper(
+ $plainname,
+ $contrib{$idx.':sendername'},
+ $contrib{$idx.':senderdomain'}).' ('.
+ $contrib{$idx.':sendername'}.':'.
+ $contrib{$idx.':senderdomain'}.')';
$sender = ''.$sender.'';
if ($contrib{$idx.':anonymous'}) {
$sender.=' ['.$$anonhash{$key}.'] '.
@@ -1251,39 +1104,24 @@ sub build_posting_display {
if ($outputtarget ne 'tex') {
if (&editing_allowed($escsymb.':::'.$idx,$group)) {
if (($env{'user.domain'} eq $contrib{$idx.':senderdomain'}) && ($env{'user.name'} eq $contrib{$idx.':sendername'})) {
- $sender.=' '.&mt('Edit').'';
-
- unless ($seehidden) {
+ $sender.=' '.
+ &discussion_link($symb,&mt('Edit'),'editdisc',$idx,$$newpostsflag,$prevread,&group_args($group));
+ unless ($seeid) {
my $grpargs = &group_args($group);
$sender.=" ';
}
}
}
- if ($seehidden) {
+ if ($seeid) {
if ($hiddens{$idx}) {
unless ($studenthidden) {
- $sender.=' '.&mt('Make Visible').'';
+ $sender.=' '.
+ &discussion_link($symb,&mt('Make Visible'),'unhide',$idx,$$newpostsflag,$prevread,&group_args($group));
}
} else {
- $sender.=' '.&mt('Hide').'';
+ $sender.=' '.
+ &discussion_link($symb,&mt('Hide'),'hide',$idx,$$newpostsflag,$prevread,&group_args($group));
}
my $grpargs = &group_args($group);
$sender.=
@@ -1291,7 +1129,7 @@ sub build_posting_display {
$sender .= &mt('Delete').'';
}
}
- } else {
+ } else {
if ($screenname) {
$sender=''.$screenname.'';
} else {
@@ -1318,33 +1156,24 @@ sub build_posting_display {
}
}
if ($outputtarget ne 'tex') {
- if (&discussion_open($status)) {
+ if (&discussion_open($status)) {
if (($group ne '') &&
(&check_group_priv($group,'pgd') eq 'ok')) {
- $sender.=' '.&mt('Reply').'';
+ $sender.=' '.
+ &discussion_link($symb,&mt('Reply'),'replydisc',$idx,$$newpostsflag,$prevread,&group_args($group));
} elsif (&Apache::lonnet::allowed('pch',
$env{'request.course.id'}.
($env{'request.course.sec'}?'/'.
$env{'request.course.sec'}:''))) {
- $sender.=' '.&mt('Reply').'';
+ $sender.=' '.
+ &discussion_link($symb,&mt('Reply'),'replydisc',$idx,$$newpostsflag,$prevread);
}
}
- if ($viewgrades) {
+ if ($viewgrades) {
$vgrlink=&Apache::loncommon::submlink(&mt('Submissions'),
$contrib{$idx.':sendername'},$contrib{$idx.':senderdomain'},$ressymb);
}
- if ($$dischash{$readkey}=~/\.$idx\./) {
+ if ($$dischash{$readkey}=~/\.$idx\./) {
$ctlink = '';
} else {
$ctlink = '';
@@ -1387,15 +1216,14 @@ sub build_posting_display {
} else {
if ($message) {
my $spansize = 2;
- my ($uname,$udom);
if ($showonlyunread && $prevread > $posttime) {
$$notshown{$idx} = 1;
} elsif ($showunmark && $$dischash{$readkey}=~/\.$idx\./) {
$$notshown{$idx} = 1;
} else {
# apply filters
- $uname = $contrib{$idx.':sendername'};
- $udom = $contrib{$idx.':senderdomain'};
+ my $uname = $contrib{$idx.':sendername'};
+ my $udom = $contrib{$idx.':senderdomain'};
my $poster = $uname.':'.$udom;
if ($env{'form.totposters'} ne '') {
if ($totposters == 0) {
@@ -1463,73 +1291,14 @@ sub build_posting_display {
$$discussionitems[$idx].=' | '.
$ctlink.' | ';
}
- my $likesize="100";
- if ($seeid || $canvote) {
-# Figure out size based on likes
- my $thislikes=$likes{$symb.':'.$idx.':likes'};
- if ($thislikes>$twoplus) {
- $likesize="200";
- } elsif ($thislikes>$oneplus) {
- $likesize="150";
- }
- if ($thislikes<$twominus) {
- $likesize="50";
- } elsif ($thislikes<$oneminus) {
- $likesize="75";
- }
- }
-# Actually glue in the message itself
$$discussionitems[$idx].= '
'.
- "".
- $message.
- ' ';
- if ($canvote) {
- my $ownpost;
- if (($uname eq $env{'user.name'}) &&
- ($udom eq $env{'user.domain'})) {
- $ownpost = 1;
- }
-# Put in the like and unlike buttons
- if ($ownpost || (($hiddens{$idx}) && ($seehidden))) {
- my $novote;
- if ($ownpost) {
- $novote = &mt('No voting for your own posts.');
- } else {
- $novote = &mt('No voting for hidden posts.');
- }
- $$discussionitems[$idx].=
- ''.
- ' '.
- '';
- } else {
- if ($userlikes{$idx}) {
- $$discussionitems[$idx].='';
- } else {
- $$discussionitems[$idx].=' '.&discussion_link($symb,'','like',$idx,$$newpostsflag,$prevread,&group_args($group),&mt("Like this posting"));
- }
- if ($userunlikes{$idx}) {
- $$discussionitems[$idx].='';
- } else {
- $$discussionitems[$idx].=' '.&discussion_link($symb,'','unlike',$idx,$$newpostsflag,$prevread,&group_args($group),&mt("Unlike this posting"));
- }
- }
- }
- if ($seeid || $canvote) {
- my $thislikes=$likes{$symb.':'.$idx.':likes'};
- if ($thislikes>0) {
- $$discussionitems[$idx].=' ('.&mt("[_1] likes",$thislikes).')';
- } elsif ($thislikes<0) {
- $$discussionitems[$idx].=' ('.&mt("[_1] unlikes",abs($thislikes)).')';
- }
- }
-# If there is any history to this post, inform the reader
+ $message.'';
if ($contrib{$idx.':history'}) {
my @postversions = ();
$$discussionitems[$idx] .= &mt('This post has been edited by the author.');
- if ($seehidden) {
- $$discussionitems[$idx] .= ' '.&mt('Display all versions').'';
+ if ($seeid) {
+ $$discussionitems[$idx] .= ' '.
+ &discussion_link($symb,&mt('Display all versions'),'allversions',$idx,$$newpostsflag,$prevread,&group_args($group));
}
$$discussionitems[$idx].=' '.&mt('Earlier version(s) were posted on: ');
if ($contrib{$idx.':history'} =~ m/:/) {
@@ -1606,13 +1375,13 @@ sub filter_regexp {
sub get_post_contents {
- my ($contrib,$idx,$seeid,$seehidden,$type,$messages,$subjects,$allattachments,$attachtxt,$imsfiles,$screenname,$plainname,$showaboutme,$numver) = @_;
+ my ($contrib,$idx,$seeid,$type,$messages,$subjects,$allattachments,$attachtxt,$imsfiles,$screenname,$plainname,$numver) = @_;
my $discussion = '';
my $start=$numver;
my $end=$numver + 1;
%{$$imsfiles{$idx}}=();
if ($type eq 'allversions') {
- unless($seehidden) {
+ unless($seeid) {
$discussion=&mt('You do not have privileges to view all versions of posts.').' '.&mt('Please select a different role.');
return $discussion;
}
@@ -1624,20 +1393,13 @@ sub get_post_contents {
$$contrib{$idx.':sendername'},
$$contrib{$idx.':senderdomain'});
$$screenname=$$contrib{$idx.':screenname'};
- $$showaboutme = &Apache::lonnet::usertools_access($$contrib{$idx.':sendername'},
- $$contrib{$idx.':senderdomain'},
- 'aboutme');
- my $sender = $$plainname;
- if ($$showaboutme) {
- $sender = &Apache::loncommon::aboutmewrapper(
+
+ my $sender=&Apache::loncommon::aboutmewrapper(
$$plainname,
$$contrib{$idx.':sendername'},
- $$contrib{$idx.':senderdomain'});
- }
- if ($seeid) {
- $sender .= ' ('.$$contrib{$idx.':sendername'}.':'.
- $$contrib{$idx.':senderdomain'}.')';
- }
+ $$contrib{$idx.':senderdomain'}).' ('.
+ $$contrib{$idx.':sendername'}.':'.
+ $$contrib{$idx.':senderdomain'}.')';
my $attachmenturls = $$contrib{$idx.':attachmenturl'};
my @postversions = ();
if ($type eq 'allversions' || $type eq 'export') {
@@ -1822,7 +1584,6 @@ END
$env{'course.'.$env{'request.course.id'}.'.domain'},
$env{'course.'.$env{'request.course.id'}.'.num'});
unless (($contrib{'hidden'}=~/\.$idx\./) || ($contrib{'deleted'}=~/\.$idx\./)) {
- my $numoldver = 0;
if ($contrib{$idx.':history'}) {
if ($contrib{$idx.':history'} =~ /:/) {
my @oldversions = split(/:/,$contrib{$idx.':history'});
@@ -1831,25 +1592,36 @@ END
$numoldver = 1;
}
}
- if ($idx > 0) {
- my (%msgversions,%subversions,$htmldecode);
- $htmldecode = 0;
- if ($env{'form.replydisc'}) {
- $htmldecode = 1;
+ if ($env{'form.replydisc'}) {
+ if ($contrib{$idx.':history'}) {
+ if ($contrib{$idx.':history'} =~ /:/) {
+ my @oldversions = split(/:/,$contrib{$idx.':history'});
+ $numoldver = @oldversions;
+ } else {
+ $numoldver = 1;
+ }
}
- &get_post_versions(\%msgversions,$contrib{$idx.':message'},0,$numoldver);
- &get_post_versions(\%subversions,$contrib{$idx.':subject'},$htmldecode,
- $numoldver);
- $subject = $subversions{$numoldver};
- if ($env{'form.replydisc'}) {
+ if ($idx > 0) {
+ my %msgversions = ();
+ &get_post_versions(\%msgversions,$contrib{$idx.':message'},0,$numoldver);
$quote = $msgversions{$numoldver};
- $subject = &HTML::Entities::encode(&mt('Re: ').$subject,'<>&"');
- } else {
- $comment = $msgversions{$numoldver};
}
- }
- if ($env{'form.editdisc'}) {
+ if ($idx > 0) {
+ my %subversions = ();
+ &get_post_versions(\%subversions,$contrib{$idx.':subject'},1,$numoldver);
+ $subject = &mt('Re: ').$subversions{$numoldver};
+ }
+ $subject = &HTML::Entities::encode($subject,'<>&"');
+ } else {
$attachmenturls = $contrib{$idx.':attachmenturl'};
+ if ($idx > 0) {
+ my %msgversions = ();
+ &get_post_versions(\%msgversions,$contrib{$idx.':message'},0,$numoldver);
+ $comment = $msgversions{$numoldver};
+ my %subversions = ();
+ &get_post_versions(\%subversions,$contrib{$idx.':subject'},0,$numoldver);
+ $subject = $subversions{$numoldver};
+ }
if (defined($contrib{$idx.':replyto'})) {
$parentmsg = $contrib{$idx.':replyto'};
}
@@ -1940,10 +1712,10 @@ END
'text' => 'Resource Feedback and Discussion'}];
my %onload = ('onload' => 'window.focus();setposttype();');
+ my %parms=('add_entries' => \%onload);
+ if ($env{'form.modal'} ne 'yes') { 'bread_crumbs' => $brcrum }
my $start_page=
- &Apache::loncommon::start_page('Resource Feedback and Discussion',$js,
- {'add_entries' => \%onload,
- 'bread_crumbs' => $brcrum,});
+ &Apache::loncommon::start_page('Resource Feedback and Discussion',$js,\%parms);
if ($quote ne '') {
$quote = &HTML::Entities::decode($quote);
@@ -1960,6 +1732,7 @@ $start_page
enctype="multipart/form-data">
$prevtag
+
END
if ($env{'form.replydisc'}) {
$r->print(<
$lt{'title'}:
-
END
if ( ($env{'form.editdisc'}) || ($env{'form.replydisc'}) ) {
@@ -2498,11 +2271,24 @@ sub print_showposters {
$r->send_http_header;
&Apache::lonenc::check_encrypt(\$symb);
+ my $crs='/'.$env{'request.course.id'};
+ if ($env{'request.course.sec'}) {
+ $crs.='_'.$env{'request.course.sec'};
+ }
+ $crs=~s/\_/\//g;
+ my $seeid;
my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};
my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'};
my $group = $env{'form.group'};
my $ressymb = &wrap_symb($symb);
- my $seehidden = &can_see_hidden('',$ressymb,$feedurl,$group,$cdom,$cnum);
+ if (($group ne '') &&
+ ($ressymb =~ m|^bulletin___\d+___adm/wrapper/adm/\Q$cdom\E/\Q$cnum\E/\d+/bulletinboard$|)) {
+ if (&check_group_priv($group,'dgp') eq 'ok') {
+ $seeid = 1;
+ }
+ } else {
+ $seeid=&Apache::lonnet::allowed('rin',$crs);
+ }
my %contrib=&Apache::lonnet::restore($symb,$env{'request.course.id'},
$cdom,$cnum);
my %namesort = ();
@@ -2518,7 +2304,7 @@ sub print_showposters {
for (my $idx=1;$idx<=$contrib{'version'};$idx++) {
my $hidden=($contrib{'hidden'}=~/\.$idx\./);
my $deleted=($contrib{'deleted'}=~/\.$idx\./);
- unless ((($hidden) && (!$seehidden)) || ($deleted)) {
+ unless ((($hidden) && (!$seeid)) || ($deleted)) {
if ((!$contrib{$idx.':anonymous'}) || (&Apache::lonnet::allowed('rin',$env{'request.course.id'}.($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:'')))) {
my %names = &Apache::lonnet::get('environment',['firstname','lastname'],$contrib{$idx.':senderdomain'},$contrib{$idx.':sendername'});
my $lastname = $names{'lastname'};
@@ -2769,16 +2555,14 @@ sub redirect_back {
}
&Apache::lonenc::check_encrypt(\$feedurl);
my $logo=&Apache::loncommon::lonhttpdurl('/adm/lonIcons/lonlogos.gif');
- my %onload;
- if ($env{'environment.remote'} ne 'off') {
- $onload{'onload'} =
- "if (window.name!='loncapaclient') { this.document.reldt.submit(); self.window.close(); }";
+ my %parms=('only_body' => 1);
+ if ($env{'form.modal'}) {
+ $parms{'add_entries'}={'onLoad' => 'document.forms.reldt.submit()'};
+ } else {
+ $parms{'redirect'}=[0,$feedurl];
}
my $start_page=
- &Apache::loncommon::start_page('Feedback sent',undef,
- {'redirect' => [0,$feedurl],
- 'only_body' => 1,
- 'add_entries' => \%onload});
+ &Apache::loncommon::start_page('Feedback sent',undef,\%parms);
my $end_page = &Apache::loncommon::end_page();
$r->print(< 1,
'bgcolor' => '#FFFFFF',
'add_entries' => \%onload,);
if ($feedurl !~ m{^/adm/feedback}) {
- $body_options{'redirect'} = [2,$feedurl];
+ $body_options{'rediect'} = [2,$feedurl];
}
my $start_page=
&Apache::loncommon::start_page('Feedback not sent',undef,
@@ -2888,11 +2668,16 @@ sub screen_header {
my ($blocked,$blocktext) = &Apache::loncommon::blocking_status('boards');
my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};
my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'};
- my $realsymb = &get_realsymb($symb);
+ my $realsymb = $symb;
+ if ($symb=~/^bulletin___/) {
+ my $filename=(&Apache::lonnet::decode_symb($symb))[2];
+ $filename=~s|^adm/wrapper/||;
+ $realsymb=&Apache::lonnet::symbread($filename);
+ }
if (!$blocked && &discussion_open(undef,$realsymb) &&
(&Apache::lonnet::allowed('pch',
- $env{'request.course.id'}.
- ($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:'')) ||
+ $env{'request.course.id'}.
+ ($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:'')) ||
(($group ne '') && ($symb =~ m{^bulletin___\d+___adm/wrapper/adm/\Q$cdom\E/\Q$cnum\E/\d+/bulletinboard$}) && (&check_group_priv($group,'pgd') eq 'ok')))) {
$discussoptions=' |