--- loncom/homework/lonhomework.pm 2002/02/27 20:23:26 1.71
+++ loncom/homework/lonhomework.pm 2002/03/22 20:11:00 1.73
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Homework handler
#
-# $Id: lonhomework.pm,v 1.71 2002/02/27 20:23:26 albertel Exp $
+# $Id: lonhomework.pm,v 1.73 2002/03/22 20:11:00 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -31,17 +31,18 @@
package Apache::lonhomework;
use strict;
-use Apache::style;
-use Apache::lonxml;
-use Apache::lonnet;
-use Apache::lonplot;
-use Apache::inputtags;
-use Apache::structuretags;
-use Apache::randomlabel;
-use Apache::response;
-use Apache::hint;
-use Apache::outputtags;
+use Apache::style();
+use Apache::lonxml();
+use Apache::lonnet();
+use Apache::lonplot();
+use Apache::inputtags();
+use Apache::structuretags();
+use Apache::randomlabel();
+use Apache::response();
+use Apache::hint();
+use Apache::outputtags();
use Apache::Constants qw(:common);
+use HTML::Entities();
#use Time::HiRes qw( gettimeofday tv_interval );
BEGIN {
@@ -128,6 +129,7 @@ sub check_access {
my $type;
my $passed;
&Apache::lonxml::debug("checking for part :$id:");
+ &Apache::lonxml::debug("time:".time);
foreach $temp ("opendate","duedate","answerdate") {
$lastdate = $date;
$date = &Apache::lonnet::EXT("resource.$id.$temp");
@@ -189,7 +191,20 @@ sub showhash {
my (%hash) = @_;
my $resultkey;
foreach $resultkey (sort keys %hash) {
- &Apache::lonxml::debug("$resultkey ---- $hash{$resultkey}");
+ if (ref($hash{$resultkey})) {
+ if ($hash{$resultkey} =~ /ARRAY/ ) {
+ my $string="$resultkey ---- (";
+ foreach my $elm (@{ $hash{$resultkey} }) {
+ $string.="$elm,";
+ }
+ chop($string);
+ &Apache::lonxml::debug("$string)");
+ } else {
+ &Apache::lonxml::debug("$resultkey ---- $hash{$resultkey}");
+ }
+ } else {
+ &Apache::lonxml::debug("$resultkey ---- $hash{$resultkey}");
+ }
}
&Apache::lonxml::debug("\n
restored values^\n");
return '';
@@ -281,7 +296,7 @@ sub editxmlmode {