--- loncom/homework/daxeopen.pm 2015/12/15 15:00:58 1.3 +++ loncom/homework/daxeopen.pm 2016/01/06 16:44:30 1.4 @@ -1,7 +1,7 @@ # The LearningOnline Network # Opening converted problems and directory listings for Daxe # -# $Id: daxeopen.pm,v 1.3 2015/12/15 15:00:58 damieng Exp $ +# $Id: daxeopen.pm,v 1.4 2016/01/06 16:44:30 damieng Exp $ # # Copyright Michigan State University Board of Trustees # @@ -49,7 +49,7 @@ sub handler { &Apache::loncommon::no_cache($request); if ($uri =~ /\/$/) { return directory_listing($uri, $request); - } elsif ($uri =~ /\.(task|problem|exam|quiz|assess|survey|library)$/) { + } elsif ($uri =~ /\.(task|problem|exam|quiz|assess|survey|library|xml|html|htm|xhtml|xhtm)$/) { return convert_problem($uri, $request); } else { # Apache should send other files directly @@ -70,7 +70,13 @@ sub convert_problem { try { my $warnings = 0; # no warning printed my $textref = &Apache::pre_xml::pre_xml($file, $warnings); - $textref = &Apache::html_to_xml::html_to_xml($textref, $warnings); + my $case_sensitive; + if ($uri =~ /\.(task)$/) { + $case_sensitive = 1; + } else { + $case_sensitive = 0; + } + $textref = &Apache::html_to_xml::html_to_xml($textref, $warnings, $case_sensitive); my $text = &Apache::post_xml::post_xml($textref, $file, $perlvar{'lonDocRoot'}, $warnings); &Apache::loncommon::content_type($request, 'text/xml', 'utf-8'); $request->print($text);