';
- if ($visible>2) {
- $discussion.=''.
- ''.&mt('Threaded View').' '.
- ''.&mt('Chronological View').' | ';
- }
- if ($newpostsflag) {
- if (!$markondisp) {
- $discussion .=''.&mt('Mark new posts as read').' ';
+
+sub get_post_contents {
+ 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($seeid) {
+ $discussion=&mt('You do not have privileges to view all versions of posts.').&mt('Please select a different role');
+ return $discussion;
+ }
+ }
+# $$screenname=&Apache::loncommon::screenname(
+# $$contrib{$idx.':sendername'},
+# $$contrib{$idx.':senderdomain'});
+ $$plainname=&Apache::loncommon::nickname(
+ $$contrib{$idx.':sendername'},
+ $$contrib{$idx.':senderdomain'});
+ $$screenname=$$contrib{$idx.':screenname'};
+
+ my $sender=&Apache::loncommon::aboutmewrapper(
+ $$plainname,
+ $$contrib{$idx.':sendername'},
+ $$contrib{$idx.':senderdomain'}).' ('.
+ $$contrib{$idx.':sendername'}.' at '.
+ $$contrib{$idx.':senderdomain'}.')';
+ my $attachmenturls = $$contrib{$idx.':attachmenturl'};
+ my @postversions = ();
+ if ($type eq 'allversions' || $type eq 'export') {
+ $start = 0;
+ if ($$contrib{$idx.':history'}) {
+ if ($$contrib{$idx.':history'} =~ m/:/) {
+ @postversions = split/:/,$$contrib{$idx.':history'};
} else {
- $discussion .= ' | | ';
+ @postversions = ("$$contrib{$idx.':history'}");
}
- } else {
- $discussion .= ' | ';
}
- $discussion .= '