version 1.72, 2002/02/28 01:18:47
|
version 1.73, 2002/03/22 20:11:00
|
Line 31
|
Line 31
|
|
|
package Apache::lonhomework; |
package Apache::lonhomework; |
use strict; |
use strict; |
use Apache::style; |
use Apache::style(); |
use Apache::lonxml; |
use Apache::lonxml(); |
use Apache::lonnet; |
use Apache::lonnet(); |
use Apache::lonplot; |
use Apache::lonplot(); |
use Apache::inputtags; |
use Apache::inputtags(); |
use Apache::structuretags; |
use Apache::structuretags(); |
use Apache::randomlabel; |
use Apache::randomlabel(); |
use Apache::response; |
use Apache::response(); |
use Apache::hint; |
use Apache::hint(); |
use Apache::outputtags; |
use Apache::outputtags(); |
use Apache::Constants qw(:common); |
use Apache::Constants qw(:common); |
|
use HTML::Entities(); |
#use Time::HiRes qw( gettimeofday tv_interval ); |
#use Time::HiRes qw( gettimeofday tv_interval ); |
|
|
BEGIN { |
BEGIN { |
Line 128 sub check_access {
|
Line 129 sub check_access {
|
my $type; |
my $type; |
my $passed; |
my $passed; |
&Apache::lonxml::debug("checking for part :$id:"); |
&Apache::lonxml::debug("checking for part :$id:"); |
|
&Apache::lonxml::debug("time:".time); |
foreach $temp ("opendate","duedate","answerdate") { |
foreach $temp ("opendate","duedate","answerdate") { |
$lastdate = $date; |
$lastdate = $date; |
$date = &Apache::lonnet::EXT("resource.$id.$temp"); |
$date = &Apache::lonnet::EXT("resource.$id.$temp"); |
Line 189 sub showhash {
|
Line 191 sub showhash {
|
my (%hash) = @_; |
my (%hash) = @_; |
my $resultkey; |
my $resultkey; |
foreach $resultkey (sort keys %hash) { |
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<br />restored values^</br>\n"); |
&Apache::lonxml::debug("\n<br />restored values^</br>\n"); |
return ''; |
return ''; |
Line 281 sub editxmlmode {
|
Line 296 sub editxmlmode {
|
<input type="submit" name="Undo" value="undo" /> |
<input type="submit" name="Undo" value="undo" /> |
<hr /> |
<hr /> |
<textarea rows="'.$rows.'" cols="'.$cols.'" name="editxmltext">'. |
<textarea rows="'.$rows.'" cols="'.$cols.'" name="editxmltext">'. |
$problem.'</textarea> |
&HTML::Entities::encode($problem).'</textarea> |
</form></body></html>'; |
</form></body></html>'; |
$request->print($result); |
$request->print($result); |
return ''; |
return ''; |