--- loncom/xml/lonxml.pm 2003/05/16 18:34:56 1.252 +++ loncom/xml/lonxml.pm 2003/05/16 20:47:07 1.253 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.252 2003/05/16 18:34:56 bowersj2 Exp $ +# $Id: lonxml.pm,v 1.253 2003/05/16 20:47:07 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1252,23 +1252,25 @@ ENDNOTFOUND writeallows($request->uri); - # If we're editing, show the filename of the resource in the frame's main - # title - if ($ENV{'form.editmode'}) { - my $filename = $request->uri; - # Everything after the last / - $filename = substr($filename, rindex($filename, '/') + 1); - $result = substr($result, 0, rindex($result, '')); - $result .= ""; - $result .= "\n\n"; - } - $request->print($result); return OK; } +sub display_title { + my $result; + if ($ENV{'request.state'} eq 'construct') { + my $title=&Apache::lonnet::gettitle(); + if (!defined($title) || $title eq '') { + $title = $ENV{'request.filename'}; + $title = substr($title, rindex($title, '/') + 1); + } + $result = ""; + } + return $result; +} + sub debug { if ($Apache::lonxml::debug eq 1) { $|=1;