--- loncom/homework/structuretags.pm 2004/03/02 20:59:25 1.243
+++ loncom/homework/structuretags.pm 2004/03/09 20:37:58 1.245
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: structuretags.pm,v 1.243 2004/03/02 20:59:25 matthew Exp $
+# $Id: structuretags.pm,v 1.245 2004/03/09 20:37:58 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -120,6 +120,7 @@ sub page_start {
$body_tag_start.=$help;
}
}
+ $body_tag_start.=&Apache::lonxml::message_location();
}
my $form_tag_start;
if (!defined($found{'form'})) {
@@ -481,9 +482,9 @@ sub start_problem {
$result.= $head_tag_start.'';
my $msg=$body_tag_start;
if ($status eq 'UNAVAILABLE') {
- $result.='
'.&mt('Unable to determine if this resource is open due to network problems. Please try again later.').'
';
+ $msg.=''.&mt('Unable to determine if this resource is open due to network problems. Please try again later.').'
';
} else {
- $result.=''.&mt('Not open to be viewed').'
';
+ $msg.=''.&mt('Not open to be viewed').'
';
}
if ($status eq 'CLOSED' || $status eq 'INVALID_ACCESS') {
$msg.='The problem '.$accessmsg;
@@ -656,7 +657,10 @@ sub end_problem {
sub start_library {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
my ($result,$head_tag_start,$body_tag_start,$form_tag_start);
- if ($$tagstack[0] eq 'library') { &init_problem_globals('library') };
+ if ($$tagstack[0] eq 'library') {
+ &init_problem_globals('library');
+ $Apache::lonhomework::type='problem';
+ }
if ($target eq 'edit') {
($result,$head_tag_start,$body_tag_start,$form_tag_start)=
&page_start($target,$token,$tagstack,$parstack,$parser,$safeeval);