--- loncom/homework/lonhomework.pm 2002/05/23 21:12:44 1.78 +++ loncom/homework/lonhomework.pm 2002/05/24 18:55:23 1.79 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Homework handler # -# $Id: lonhomework.pm,v 1.78 2002/05/23 21:12:44 albertel Exp $ +# $Id: lonhomework.pm,v 1.79 2002/05/24 18:55:23 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -192,21 +192,29 @@ sub check_access { sub showhash { my (%hash) = @_; + &showhashsubset(\%hash,''); + return ''; +} + +sub showhashsubset { + my ($hash,$keyre) = @_; my $resultkey; - foreach $resultkey (sort keys %hash) { - if (ref($hash{$resultkey})) { - if ($hash{$resultkey} =~ /ARRAY/ ) { - my $string="$resultkey ---- ("; - foreach my $elm (@{ $hash{$resultkey} }) { - $string.="$elm,"; + foreach $resultkey (sort keys %$hash) { + if ($resultkey =~ /$keyre/) { + 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}"); } - chop($string); - &Apache::lonxml::debug("$string)"); } else { - &Apache::lonxml::debug("$resultkey ---- $hash{$resultkey}"); + &Apache::lonxml::debug("$resultkey ---- $$hash{$resultkey}"); } - } else { - &Apache::lonxml::debug("$resultkey ---- $hash{$resultkey}"); } } &Apache::lonxml::debug("\n
restored values^
\n"); @@ -344,6 +352,7 @@ sub renderpage { #if ($Apache::lonhomework::viewgrades eq 'F') {&createmenu('grade',$request); } } #if ($target eq 'grade') { &showhash(%Apache::lonhomework::history); } + #if ($target eq 'web') { &showhash(%ENV); } my $default=&Apache::lonnet::getfile('/home/httpd/html/res/adm/includes/default_homework.lcpm'); if ($default == -1) {