--- loncom/xml/lonxml.pm 2012/12/06 13:54:47 1.536 +++ loncom/xml/lonxml.pm 2013/03/11 21:37:10 1.538 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.536 2012/12/06 13:54:47 raeburn Exp $ +# $Id: lonxml.pm,v 1.538 2013/03/11 21:37:10 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1667,10 +1667,13 @@ sub handler { my ($filetype,$breadcrumbtext); if ($file =~ /\.(sty|css|js|txt|tex)$/) { $filetype=$1; - $env{'request.uri'}=$request->uri; } else { $filetype='html'; + } + unless ($env{'request.uri'}) { $env{'request.uri'}=$request->uri; + &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, + ['todocs']); } if ($filetype eq 'sty') { $breadcrumbtext = 'Style File Editor'; @@ -1877,6 +1880,7 @@ sub get_courseupload_hierarchy { while (@folders) { my $folder=shift(@folders); my $foldername=shift(@folders); + $foldername =~ s/\:(\d*)\:(\w*)\:(\w*):(\d*)\:?(\d*)$//; push(@pathitems,&unescape($foldername)); } if ($title) {