--- loncom/interface/spreadsheet/assesscalc.pm 2003/05/22 20:23:56 1.4 +++ loncom/interface/spreadsheet/assesscalc.pm 2003/05/22 21:16:35 1.5 @@ -1,5 +1,5 @@ # -# $Id: assesscalc.pm,v 1.4 2003/05/22 20:23:56 matthew Exp $ +# $Id: assesscalc.pm,v 1.5 2003/05/22 21:16:35 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -523,6 +523,20 @@ sub compute { my %f=$self->formulas(); my %c; # + # Check for blackout requirements + if ((!exists($ENV{'request.role.adv'}) || !$ENV{'request.role.adv'})) { + while (my ($parm,$value) = each(%parameters)) { + last if ($self->blackout()); + next if ($parm !~ /^(parameter_.*)_problemstatus$/); + next if ($parameters{$1.'_answerdate'}blackout(1); + } + } + } + # + # Move the parameters into the spreadsheet while (my ($parm,$value) = each(%parameters)) { my $cell = 'A'.$self->get_row_number_from_key($parm); $f{$cell} = $parm; @@ -652,7 +666,8 @@ spreadsheet only if necessary. sub export_data { my $self = shift; my $symb = $self->{'symb'}; - if (! exists($Exportrows{$symb}) || ! defined($Exportrows{$symb}) || + if (! exists($ENV{'request.role.adv'}) || ! $ENV{'request.role.adv'} || + ! exists($Exportrows{$symb}) || ! defined($Exportrows{$symb}) || ! $self->check_expiration_time($Exportrows{$symb}->{'time'}) || ! exists($Exportrows{$symb}->{$self->{'filename'}}) || ! defined($Exportrows{$symb}->{$self->{'filename'}})) {