--- loncom/xml/lonxml.pm 2001/08/10 15:49:46 1.109
+++ loncom/xml/lonxml.pm 2001/09/28 18:20:06 1.131
@@ -13,7 +13,10 @@
# 6/12,6/13 H. K. Ng
# 6/16 Gerd Kortemeyer
# 7/27 H. K. Ng
-# 8/7,8/9,8/10 Gerd Kortemeyer
+# 8/7,8/9,8/10,8/11,8/15,8/16,8/17,8/18,8/20,8/23,8/24 Gerd Kortemeyer
+# Guy Albertelli
+# 9/26 Gerd Kortemeyer
+
package Apache::lonxml;
use vars
@@ -113,20 +116,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.='';
}
@@ -135,6 +155,103 @@ sub xmlend {
return $discussion.'