version 1.16, 2003/08/01 13:33:41
|
version 1.17, 2003/09/05 01:06:45
|
Line 45 studentcalc
|
Line 45 studentcalc
|
################################################### |
################################################### |
package Apache::studentcalc; |
package Apache::studentcalc; |
|
|
|
use warnings FATAL=>'all'; |
|
no warnings 'uninitialized'; |
|
|
use strict; |
use strict; |
use Apache::Constants qw(:common :http); |
use Apache::Constants qw(:common :http); |
use Apache::lonnet; |
use Apache::lonnet; |
Line 98 sub initialize_sequence_cache {
|
Line 101 sub initialize_sequence_cache {
|
} |
} |
|
|
sub clear_package { |
sub clear_package { |
@Sequences = undef; |
undef(@Sequences); |
%Exportrows = undef; |
undef(%Exportrows); |
} |
} |
|
|
sub get_title { |
sub get_title { |
Line 493 sub compute {
|
Line 496 sub compute {
|
sub set_row_sources { |
sub set_row_sources { |
my $self = shift; |
my $self = shift; |
while (my ($cell,$value) = each(%{$self->{'formulas'}})) { |
while (my ($cell,$value) = each(%{$self->{'formulas'}})) { |
next if ($cell !~ /^A(\d+)/ && $1 > 0); |
next if ($cell !~ /^A(\d+)$/ || $1 < 1); |
my $row = $1; |
my $row = $1; |
(undef,$value) = split('__&&&__',$value); |
(undef,$value) = split('__&&&__',$value); |
$value = 'Default' if (! defined($value)); |
$value = 'Default' if (! defined($value)); |
Line 510 sub set_row_numbers {
|
Line 513 sub set_row_numbers {
|
next if ($row == 0); |
next if ($row == 0); |
my ($symb,undef) = split('__&&&__',$formula); |
my ($symb,undef) = split('__&&&__',$formula); |
$self->{'row_numbers'}->{$symb} = $row; |
$self->{'row_numbers'}->{$symb} = $row; |
$self->{'maxrow'} = $1 if ($1 > $self->{'maxrow'}); |
$self->{'maxrow'} = $row if ($row > $self->{'maxrow'}); |
} |
} |
} |
} |
|
|
Line 540 These rows are saved in the courses dire
|
Line 543 These rows are saved in the courses dire
|
############################################# |
############################################# |
############################################# |
############################################# |
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{'course.'.$ENV{'request.course.id'}.'.domain'}, |
$ENV{'course.'.$ENV{'request.course.id'}.'.domain'}, |
$ENV{'course.'.$ENV{'request.course.id'}.'.num'},undef); |
$ENV{'course.'.$ENV{'request.course.id'}.'.num'},undef); |