version 1.29, 2003/11/17 19:55:41
|
version 1.36, 2005/02/05 06:56:24
|
Line 337 sub parmval {
|
Line 337 sub parmval {
|
# |
# |
# check course |
# check course |
return $courseopt{$courselevelr} if (defined($courseopt{$courselevelr})); |
return $courseopt{$courselevelr} if (defined($courseopt{$courselevelr})); |
return $courseopt{$courselevelm} if (defined($courseopt{$courselevelm})); |
|
return $courseopt{$courselevel} if (defined($courseopt{$courselevel})); |
|
# check map parms |
# check map parms |
my $thisparm = $parmhash{$symbparm}; |
my $thisparm = $parmhash{$symbparm}; |
return $thisparm if (defined($thisparm)); |
return $thisparm if (defined($thisparm)); |
# check default |
# check default |
$thisparm = &Apache::lonnet::metadata($fn,$rwhat.'.default'); |
$thisparm = &Apache::lonnet::metadata($fn,$rwhat.'.default'); |
return $thisparm if (defined($thisparm)); |
return $thisparm if (defined($thisparm)); |
# |
# check more course |
|
return $courseopt{$courselevelm} if (defined($courseopt{$courselevelm})); |
|
return $courseopt{$courselevel} if (defined($courseopt{$courselevel})); |
|
|
# Cascade Up |
# Cascade Up |
my $space=$what; |
my $space=$what; |
$space=~s/\.\w+$//; |
$space=~s/\.[^._]+$//; |
if ($space ne '0') { |
if ($space ne '0') { |
my @parts=split(/_/,$space); |
my @parts=split(/_/,$space); |
my $id=pop(@parts); |
my $id=pop(@parts); |
Line 397 sub get_full_title {
|
Line 398 sub get_full_title {
|
my @title = ($self->get_title()); |
my @title = ($self->get_title()); |
# Look up the users identifying information |
# Look up the users identifying information |
# Get the users information |
# Get the users information |
my %userenv = &Apache::loncoursedata::GetUserName($self->{'name'}, |
my $name = &Apache::loncommon::plainname($self->{'name'}, |
$self->{'domain'}); |
$self->{'domain'}); |
my $name = |
|
join(' ',@userenv{'firstname','middlename','lastname','generation'}); |
|
$name =~ s/\s+$//; |
|
push (@title,$name); |
push (@title,$name); |
push (@title,&Apache::lonlocal::locallocaltime(time)); |
push (@title,&Apache::lonlocal::locallocaltime(time)); |
return @title; |
return @title; |
Line 531 sub csv_rows {
|
Line 529 sub csv_rows {
|
# writes the meat of the spreadsheet to an excel worksheet. Called |
# writes the meat of the spreadsheet to an excel worksheet. Called |
# by Spreadsheet::outsheet_excel; |
# by Spreadsheet::outsheet_excel; |
my $self = shift; |
my $self = shift; |
my ($filehandle) = @_; |
my ($connection,$filehandle) = @_; |
# |
# |
# Write a header row |
# Write a header row |
$self->csv_output_row($filehandle,undef, |
$self->csv_output_row($filehandle,undef, |
Line 554 sub excel_rows {
|
Line 552 sub excel_rows {
|
# writes the meat of the spreadsheet to an excel worksheet. Called |
# writes the meat of the spreadsheet to an excel worksheet. Called |
# by Spreadsheet::outsheet_excel; |
# by Spreadsheet::outsheet_excel; |
my $self = shift; |
my $self = shift; |
my ($worksheet,$cols_output,$rows_output) = @_; |
my ($connection,$worksheet,$cols_output,$rows_output) = @_; |
|
return if (! ref($worksheet)); |
# |
# |
# Write a header row |
# Write a header row |
$cols_output = 0; |
$cols_output = 0; |
foreach my $value ('Parameter','Description','Value') { |
foreach my $value ('Parameter','Description','Value') { |
$worksheet->write($rows_output,$cols_output++,&mt($value)); |
$worksheet->write($rows_output,$cols_output++,$value); |
} |
} |
$rows_output++; |
$rows_output++; |
# |
# |
Line 780 sub compute {
|
Line 779 sub compute {
|
while (my ($parm,$value) = each(%parameters)) { |
while (my ($parm,$value) = each(%parameters)) { |
my $cell = 'A'.$self->get_row_number_from_key($parm); |
my $cell = 'A'.$self->get_row_number_from_key($parm); |
$f{$cell} = $parm; |
$f{$cell} = $parm; |
$value = '"'.$value.'"' if ($value =~/[^0-9.]/); |
if ($parm =~ /_submission$/ && $value =~ /(\{|\})/) { |
|
$value = 'witheld'; |
|
} |
|
$value = 'q{'.$value.'}' if ($value =~/([^\d\.]|\.\.)/); |
$c{$parm} = $value; |
$c{$parm} = $value; |
} |
} |
$self->formulas(\%f); |
$self->formulas(\%f); |
Line 872 sub load_cached_export_rows {
|
Line 874 sub load_cached_export_rows {
|
# We only got one key, so we will access it directly. |
# We only got one key, so we will access it directly. |
while (my ($key,$sheetdata) = each(%tmp)) { |
while (my ($key,$sheetdata) = each(%tmp)) { |
my ($sname,$sdom,$sheettype,$symb) = split(':',$key); |
my ($sname,$sdom,$sheettype,$symb) = split(':',$key); |
|
if (! defined($sname) || $sname eq '' || |
|
! defined($sdom) || $sdom eq '' ) { |
|
next; |
|
} |
if ($symb =~ /\.time$/) { |
if ($symb =~ /\.time$/) { |
$symb =~ s/\.time$//; |
$symb =~ s/\.time$//; |
$Exportrows{$symb}->{'time'} = $sheetdata; |
$Exportrows{$symb}->{'time'} = $sheetdata; |