version 1.17.2.1, 2003/09/23 01:52:57
|
version 1.18, 2003/09/05 01:06:45
|
Line 44 assesscalc
|
Line 44 assesscalc
|
package Apache::assesscalc; |
package Apache::assesscalc; |
|
|
use strict; |
use strict; |
|
use warnings FATAL=>'all'; |
|
no warnings 'uninitialized'; |
use Apache::Constants qw(:common :http); |
use Apache::Constants qw(:common :http); |
use Apache::lonnet; |
use Apache::lonnet; |
use Apache::loncommon; |
use Apache::loncommon; |
Line 167 sub load_parameter_caches {
|
Line 169 sub load_parameter_caches {
|
# |
# |
# Course Parameters Cache |
# Course Parameters Cache |
if (! %courseopt) { |
if (! %courseopt) { |
&Apache::lonnet::logthis("loading course options"); |
|
$current_course = $ENV{'request.course.id'}; |
$current_course = $ENV{'request.course.id'}; |
undef(%courseopt); |
undef(%courseopt); |
if (! defined($current_name) || ! defined($current_domain)) { |
if (! defined($current_name) || ! defined($current_domain)) { |
Line 594 sub compute {
|
Line 595 sub compute {
|
while (my ($parm,$value) = each(%parameters)) { |
while (my ($parm,$value) = each(%parameters)) { |
last if ($self->blackout()); |
last if ($self->blackout()); |
next if ($parm !~ /^(parameter_.*)_problemstatus$/); |
next if ($parm !~ /^(parameter_.*)_problemstatus$/); |
if ($parameters{$1.'_answerdate'} ne '' && |
next if ($parameters{$1.'_answerdate'}<time); |
$parameters{$1.'_answerdate'} < time) { |
|
next; |
|
} |
|
if (lc($value) eq 'no') { |
if (lc($value) eq 'no') { |
# We must blackout this sheet |
# We must blackout this sheet |
$self->blackout(1); |
$self->blackout(1); |
Line 692 These rows are saved in the students dir
|
Line 690 These rows are saved in the students dir
|
######################################################## |
######################################################## |
######################################################## |
######################################################## |
sub load_cached_export_rows { |
sub load_cached_export_rows { |
%Exportrows = undef; |
undef(%Exportrows); |
my @tmp = &Apache::lonnet::dump('nohist_calculatedsheets_'. |
my @tmp = &Apache::lonnet::dump('nohist_calculatedsheets_'. |
$ENV{'request.course.id'}, |
$ENV{'request.course.id'}, |
$current_domain,$current_name,undef); |
$current_domain,$current_name,undef); |
Line 738 sub export_data {
|
Line 736 sub export_data {
|
! exists($Exportrows{$symb}) || ! defined($Exportrows{$symb}) || |
! exists($Exportrows{$symb}) || ! defined($Exportrows{$symb}) || |
! $self->check_expiration_time($Exportrows{$symb}->{'time'}) || |
! $self->check_expiration_time($Exportrows{$symb}->{'time'}) || |
! exists($Exportrows{$symb}->{$self->{'filename'}}) || |
! exists($Exportrows{$symb}->{$self->{'filename'}}) || |
! defined($Exportrows{$symb}->{$self->{'filename'}})) { |
! defined($Exportrows{$symb}->{$self->{'filename'}}) || |
|
! ref($Exportrows{$symb}->{$self->{'filename'}}) |
|
) { |
$self->compute(); |
$self->compute(); |
} |
} |
my @Data = @{$Exportrows{$symb}->{$self->{'filename'}}}; |
my @Data = @{$Exportrows{$symb}->{$self->{'filename'}}}; |