--- loncom/xml/lonxml.pm 2002/09/11 13:36:50 1.195 +++ loncom/xml/lonxml.pm 2002/10/14 20:44:16 1.202 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.195 2002/09/11 13:36:50 www Exp $ +# $Id: lonxml.pm,v 1.202 2002/10/14 20:44:16 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -99,6 +99,8 @@ use Apache::edit(); use Apache::lonnet(); use Apache::File(); use Apache::loncommon(); +use Apache::lonfeedback(); +use Apache::lonmsg(); #================================================== Main subroutine: xmlparse #debugging control, to turn on debugging modify the correct handler @@ -186,17 +188,24 @@ sub xmlend { if ($hidden) { $message=''.$message.''; } + my $screenname=&Apache::loncommon::screenname( + $contrib{$idx.':sendername'}, + $contrib{$idx.':senderdomain'}); + my $plainname=&Apache::loncommon::nickname( + $contrib{$idx.':sendername'}, + $contrib{$idx.':senderdomain'}); + my $sender='Anonymous'; if ((!$contrib{$idx.':anonymous'}) || ($seeid)) { $sender=&Apache::loncommon::aboutmewrapper( - $contrib{$idx.':plainname'}, + $plainname, $contrib{$idx.':sendername'}, $contrib{$idx.':senderdomain'}).' ('. $contrib{$idx.':sendername'}.' at '. $contrib{$idx.':senderdomain'}.')'; if ($contrib{$idx.':anonymous'}) { $sender.=' [anonymous] '. - $contrib{$idx.':screenname'}; + $screenname; } if ($seeid) { if ($hidden) { @@ -208,8 +217,8 @@ sub xmlend { } } } else { - if ($contrib{$idx.':screenname'}) { - $sender=''.$contrib{$idx.':screenname'}.''; + if ($screenname) { + $sender=''.$screenname.''; } } $discussion.='

'.$sender.' ('. @@ -225,7 +234,7 @@ sub xmlend { } if ($discussiononly) { $discussion.=(< +

@@ -236,6 +245,7 @@ course faculty
ENDDISCUSS + $discussion.=&Apache::lonfeedback::generate_preview_button(); } } } @@ -356,6 +366,7 @@ sub registerurl { my $forcereg=shift; my $target = shift; my $result = ''; + if ($target eq 'edit') { $result .="