--- loncom/xml/lonxml.pm 2001/08/10 15:49:46 1.109
+++ loncom/xml/lonxml.pm 2001/08/10 16:22:23 1.110
@@ -113,20 +113,37 @@ sub xmlend {
'
Course Discussion of Resource
';
my $idx;
for ($idx=1;$idx<=$contrib{'version'};$idx++) {
- my $message=$contrib{$idx.':message'};
- $message=~s/\n/\
/g;
+ my $hidden=($contrib{'hidden'}=~/\.$idx\./);
+ unless (($hidden) && (!$seeid)) {
+ my $message=$contrib{$idx.':message'};
+ $message=~s/\n/\
/g;
+ if ($message) {
+ if ($hidden) {
+ $message=''.$message.'';
+ }
my $sender='Anonymous';
if ((!$contrib{$idx.':anonymous'}) || ($seeid)) {
$sender=$contrib{$idx.':sendername'}.' at '.
$contrib{$idx.':senderdomain'};
if ($contrib{$idx.':anonymous'}) {
$sender.=' (anonymous)';
+ }
+ if ($seeid) {
+ if ($hidden) {
+ $sender.=' Make Visible';
+ } else {
+ $sender.=' Hide';
+ }
}
}
$discussion.=''.$sender.' ('.
localtime($contrib{$idx.':timestamp'}).
'):
'.$message.
- '
';
+ '';
+ }
+ }
}
$discussion.='';
}