[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm /xml lonxml.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Thu, 31 Mar 2005 15:55:48 -0000
albertel Thu Mar 31 10:55:48 2005 EDT
Modified files:
/loncom/lonnet/perl lonnet.pm
/loncom/xml lonxml.pm
Log:
- adding Apache::lonhomework::parsing_a_task
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.617 loncom/lonnet/perl/lonnet.pm:1.618
--- loncom/lonnet/perl/lonnet.pm:1.617 Mon Mar 28 16:49:31 2005
+++ loncom/lonnet/perl/lonnet.pm Thu Mar 31 10:55:47 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.617 2005/03/28 21:49:31 albertel Exp $
+# $Id: lonnet.pm,v 1.618 2005/03/31 15:55:47 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -4173,7 +4173,8 @@
if ($realm eq 'user') {
# --------------------------------------------------------------- user.resource
if ($space eq 'resource') {
- if (defined($Apache::lonhomework::parsing_a_problem)) {
+ if (defined($Apache::lonhomework::parsing_a_problem) ||
+ defined($Apache::lonhomework::parsing_a_task)) {
return $Apache::lonhomework::history{$qualifierrest};
} else {
my %restored;
@@ -5023,8 +5024,9 @@
sub getCODE {
if (&validCODE($ENV{'form.CODE'})) { return $ENV{'form.CODE'}; }
- if (defined($Apache::lonhomework::parsing_a_problem) &&
- &validCODE($Apache::lonhomework::history{'resource.CODE'})) {
+ if ( (defined($Apache::lonhomework::parsing_a_problem) ||
+ defined($Apache::lonhomework::parsing_a_task) ) &&
+ &validCODE($Apache::lonhomework::history{'resource.CODE'})) {
return $Apache::lonhomework::history{'resource.CODE'};
}
return undef;
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.367 loncom/xml/lonxml.pm:1.368
--- loncom/xml/lonxml.pm:1.367 Wed Mar 23 17:02:32 2005
+++ loncom/xml/lonxml.pm Thu Mar 31 10:55:47 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# XML Parser Module
#
-# $Id: lonxml.pm,v 1.367 2005/03/23 22:02:32 albertel Exp $
+# $Id: lonxml.pm,v 1.368 2005/03/31 15:55:47 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -174,7 +174,8 @@
my ($target,$parser)=@_;
my $mode='xml';
my $status='OPEN';
- if ($Apache::lonhomework::parsing_a_problem) {
+ if ($Apache::lonhomework::parsing_a_problem ||
+ $Apache::lonhomework::parsing_a_task ) {
$mode='problem';
$status=$Apache::inputtags::status[-1];
}
@@ -1370,6 +1371,7 @@
if (!$ENV{'form.editmode'} || $ENV{'form.viewmode'}) {
$result = &Apache::lonxml::xmlparse($request,$target,$filecontents,
'',%mystyle);
+ undef($Apache::lonhomework::parsing_a_task);
}
}