--- loncom/homework/structuretags.pm 2004/07/02 08:14:41 1.259
+++ loncom/homework/structuretags.pm 2004/08/29 07:49:35 1.266
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: structuretags.pm,v 1.259 2004/07/02 08:14:41 albertel Exp $
+# $Id: structuretags.pm,v 1.266 2004/08/29 07:49:35 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -83,7 +83,8 @@ sub page_start {
$result=&Apache::londefdef::start_html($target,$token,$tagstack,
$parstack,$parser,$safeeval);
$head_tag_start='
'.&Apache::lonmenu::registerurl(undef,$target).
- &Apache::lonhtmlcommon::htmlareaheaders();
+ &Apache::lonhtmlcommon::htmlareaheaders().
+ &Apache::lonhtmlcommon::spellheader();
}
my $body_tag_start;
if (!defined($found{'body'})) {
@@ -191,10 +192,8 @@ sub problem_edit_header {
'.
- &Apache::loncommon::help_open_topic('Problem_Editor_XML_Index',
- 'Problem Editing Help').' | '.
- &Apache::loncommon::help_open_faq(5).
- &Apache::loncommon::help_open_bug('Authoring').' |
'.
+ &Apache::loncommon::help_open_menu('','Problem Editing Help','Problem_Editor_XML_Index','',5,'Authoring',undef,undef,undef,'Problem Editing Help')
+ .''.
'';
}
@@ -355,12 +354,13 @@ sub init_problem_globals {
if ($type eq 'problem') {
$Apache::inputtags::part='0';
@Apache::inputtags::partlist=('0');
-
- $Apache::lonhomework::problemstatus=&get_problem_status('0')
- } else {
+ $Apache::lonhomework::problemstatus=&get_problem_status('0');
+ $Apache::lonhomework::ignore_response_errors=0;
+ } elsif ($type eq 'library') {
$Apache::inputtags::part='';
@Apache::inputtags::partlist=();
$Apache::lonhomework::problemstatus='';
+ $Apache::lonhomework::ignore_response_errors=1;
}
@Apache::inputtags::responselist = ();
@Apache::inputtags::importlist = ();
@@ -647,14 +647,15 @@ sub end_problem {
$endminipage = '\end{minipage}';
}
if ($ENV{'form.print_discussions'} eq 'yes') {
- $result.=&Apache::lonxml::xmlend();
+ $result.=&Apache::lonxml::xmlend($target,$parser);
$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} ';
} else {
- $result .= '';
+ $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} ';
+ } else {
+ $result .= '';
+ }
}
}
}
@@ -1085,7 +1086,11 @@ sub start_part {
} else {
if ($target eq 'tex') {
if (not $ENV{'form.problem_split'}=~/yes/) {
- $result.='\noindent \end{minipage}\vskip 0 mm \noindent \begin{minipage}{\textwidth}\noindent';
+ if ($$tagstack[-2] eq 'td') {
+ $result.='\vskip 0 mm \noindent \begin{minipage}{\textwidth}\noindent';
+ } else {
+ $result.='\noindent \end{minipage}\vskip 0 mm \noindent \begin{minipage}{\textwidth}\noindent';
+ }
}
my $weight = &Apache::lonnet::EXT("resource.$id.weight");
my $allkeys=&Apache::lonnet::metadata($ENV{'request.uri'},'packages');
@@ -1145,6 +1150,7 @@ sub end_part {
$gradestatus='';
}
$result=$gradestatus;
+ if ($$tagstack[-2] eq 'td' and $target eq 'tex') {$result.='\end{minipage}';}
} elsif ($target eq 'edit') {
$result=&Apache::edit::end_table();
}
|