'.
'';
}
return $discussion;
}
@@ -763,7 +771,7 @@ sub build_posting_display {
my @original=();
my @index=();
my $symb=&Apache::lonenc::check_decrypt($ressymb);
- my $escsymb=&Apache::lonnet::escape($ressymb);
+ my $escsymb=&escape($ressymb);
my %contrib=&Apache::lonnet::restore($symb,$env{'request.course.id'},
$env{'course.'.$env{'request.course.id'}.'.domain'},
$env{'course.'.$env{'request.course.id'}.'.num'});
@@ -905,16 +913,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 +932,22 @@ sub build_posting_display {
unless ($studenthidden) {
$sender.=' '.&mt('Make Visible').'';
}
} else {
$sender.=' '.&mt('Hide').'';
}
$sender.=' '.&mt('Delete').'';
@@ -975,8 +983,8 @@ sub build_posting_display {
($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:''))) {
$sender.=' '.&mt('Reply').'';
}
@@ -1196,11 +1204,7 @@ sub get_post_contents {
if ($type eq 'allversions' || $type eq 'export') {
$start = 0;
if ($$contrib{$idx.':history'}) {
- if ($$contrib{$idx.':history'} =~ m/:/) {
- @postversions = split/:/,$$contrib{$idx.':history'};
- } else {
- @postversions = ("$$contrib{$idx.':history'}");
- }
+ @postversions = split(/:/,$$contrib{$idx.':history'});
}
&get_post_versions($messages,$$contrib{$idx.':message'},1);
&get_post_versions($subjects,$$contrib{$idx.':subject'},1);
@@ -1256,7 +1260,7 @@ END
}
}
if ($type eq 'allversions') {
- $discussion.=(' |