--- loncom/homework/structuretags.pm 2004/06/03 16:42:02 1.255 +++ loncom/homework/structuretags.pm 2004/06/29 22:32:12 1.258 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.255 2004/06/03 16:42:02 www Exp $ +# $Id: structuretags.pm,v 1.258 2004/06/29 22:32:12 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -84,7 +84,6 @@ sub page_start { $parstack,$parser,$safeeval); $head_tag_start=''.&Apache::lonmenu::registerurl(undef,$target). &Apache::lonhtmlcommon::htmlareaheaders(); - @Apache::lonxml::htmlareafields=(); } my $body_tag_start; if (!defined($found{'body'})) { @@ -568,7 +567,7 @@ sub start_problem { my @due_file_content = <$temp_file>; my $due_file_content = $due_file_content[$#due_file_content]; chomp $due_file_content; - my $name_of_resourse= &Apache::lonxml::latex_special_symbols(&get_resource_name($parstack,$safeeval)); + my $name_of_resourse= &Apache::lonxml::latex_special_symbols(&get_resource_name($parstack,$safeeval),'header'); if ($due_file_content ne $duedate) { $temp_file = Apache::File->new('>'.$filename); print $temp_file "$duedate\n"; @@ -647,6 +646,10 @@ sub end_problem { if (not $ENV{'form.problem_split'}=~/yes/) { $endminipage = '\end{minipage}'; } + if ($ENV{'form.print_discussions'} eq 'yes') { + $result.=&Apache::lonxml::xmlend(); + $result=~s/<\/html>//; + } $result .= '\keephidden{ENDOFPROBLEM}\vskip 0.5mm\noindent\makebox[\textwidth/$number_of_columns][b]{\hrulefill}'; if (not $ENV{'request.symb'} =~ m/\.page_/) { $result .= $endminipage.'\end{document} '; @@ -670,6 +673,7 @@ sub end_problem { $result=&Apache::response::mandatory_part_meta; } $result.=&Apache::response::meta_part_order(); + $result.=&Apache::response::meta_response_order(); } elsif ($target eq 'edit') { &Apache::lonxml::debug("in end_problem with $target, edit"); $result = &problem_edit_footer();