version 1.60, 2005/12/08 02:22:15
|
version 1.63, 2006/02/27 19:36:20
|
Line 378 Calls the system EXT function to determi
|
Line 378 Calls the system EXT function to determi
|
|
|
#------------------------------------------------------- |
#------------------------------------------------------- |
sub EXT { |
sub EXT { |
my ($parameter) = @_; |
my ($parameter,$specific_symb) = @_; |
return '' if (! defined($parameter) || $parameter eq ''); |
return '' if (! defined($parameter) || $parameter eq ''); |
$parameter =~ s/^parameter\./resource\./; |
$parameter =~ s/^parameter\./resource\./; |
my $value = &Apache::lonnet::EXT($parameter,$symb,$domain,$name,$usection); |
if ($specific_symb eq '') { $specific_symb = $symb; } |
|
my $value = &Apache::lonnet::EXT($parameter,$specific_symb,$domain,$name, |
|
$usection); |
return $value; |
return $value; |
} |
} |
|
|
Line 1193 sub display {
|
Line 1195 sub display {
|
last; |
last; |
} |
} |
} |
} |
|
$self->{outputmode} = $outputmode; |
if ($outputmode eq 'html') { |
if ($outputmode eq 'html') { |
$self->compute($r); |
$self->compute($r); |
$self->outsheet_html($r); |
$self->outsheet_html($r); |
} elsif ($outputmode eq 'htmlclasslist') { |
} elsif ($outputmode eq 'htmlclasslist') { |
# No computation neccessary... This is kludgy |
# No computation neccessary... This is kludgy |
$self->outsheet_htmlclasslist($r); |
$self->outsheet_htmlclasslist($r); |
|
} elsif ($outputmode eq 'source') { |
|
# No computation necessary. Rumor has it that this is some |
|
# sort of kludge w.r.t. not "computing". It's also |
|
# a bit of of a kludge that we call "outsheet_html" and |
|
# let the 'outputmode' cause the outputting of source. |
|
$self->outsheet_html($r); |
} elsif ($outputmode eq 'excel') { |
} elsif ($outputmode eq 'excel') { |
$self->compute($r); |
$self->compute($r); |
$self->outsheet_excel($r); |
$self->outsheet_excel($r); |
Line 1238 sub html_export_row {
|
Line 1247 sub html_export_row {
|
foreach my $cell (@rowdata) { |
foreach my $cell (@rowdata) { |
if ($cell->{'name'} =~ /^[A-Z]/) { |
if ($cell->{'name'} =~ /^[A-Z]/) { |
$row_html .= '<td bgcolor="'.$color.'">'. |
$row_html .= '<td bgcolor="'.$color.'">'. |
&html_editable_cell($cell,$color,$allowed).'</td>'; |
&html_editable_cell($cell,$color,$allowed, |
|
$self->{outputmode} eq 'source').'</td>'; |
} else { |
} else { |
$row_html .= '<td bgcolor="#DDCCFF">'. |
$row_html .= '<td bgcolor="#DDCCFF">'. |
&html_editable_cell($cell,'#DDCCFF',$allowed).'</td>'; |
&html_editable_cell($cell,'#DDCCFF',$allowed, |
|
$self->{outputmode} eq 'source').'</td>'; |
} |
} |
} |
} |
return $row_html; |
return $row_html; |
Line 1261 sub html_template_row {
|
Line 1272 sub html_template_row {
|
&html_uneditable_cell($cell,'#FFDDDD',$allowed).'</td>'; |
&html_uneditable_cell($cell,'#FFDDDD',$allowed).'</td>'; |
} else { |
} else { |
$row_html .= '<td bgcolor="#EOFFDD">'. |
$row_html .= '<td bgcolor="#EOFFDD">'. |
&html_editable_cell($cell,'#EOFFDD',$allowed).'</td>'; |
&html_editable_cell($cell,'#EOFFDD',$allowed, |
|
$self->{outputmode} eq 'source').'</td>'; |
} |
} |
} |
} |
return $row_html; |
return $row_html; |
} |
} |
|
|
sub html_editable_cell { |
sub html_editable_cell { |
my ($cell,$bgcolor,$allowed) = @_; |
my ($cell,$bgcolor,$allowed,$showsource) = @_; |
my $result; |
my $result; |
my ($name,$formula,$value); |
my ($name,$formula,$value); |
if (defined($cell)) { |
if (defined($cell)) { |
Line 1278 sub html_editable_cell {
|
Line 1290 sub html_editable_cell {
|
} |
} |
$name = '' if (! defined($name)); |
$name = '' if (! defined($name)); |
$formula = '' if (! defined($formula)); |
$formula = '' if (! defined($formula)); |
if (! defined($value)) { |
if ($showsource) { |
|
if (!defined($formula) || $formula =~ /^\s*$/) { |
|
$value = '<font color="'.$bgcolor.'">#</font>'; |
|
} else { |
|
$value = &HTML::Entities::encode($formula, '<>&"'); |
|
} |
|
} elsif (! defined($value)) { |
$value = '<font color="'.$bgcolor.'">#</font>'; |
$value = '<font color="'.$bgcolor.'">#</font>'; |
if ($formula ne '') { |
if ($formula ne '') { |
$value = '<i>undefined value</i>'; |
$value = '<i>undefined value</i>'; |
Line 1331 sub html_row {
|
Line 1349 sub html_row {
|
$row_html .= &html_uneditable_cell($cell,'#FFDDDD'); |
$row_html .= &html_uneditable_cell($cell,'#FFDDDD'); |
} else { |
} else { |
$row_html .= '<td bgcolor="#EOFFDD">'; |
$row_html .= '<td bgcolor="#EOFFDD">'; |
$row_html .= &html_editable_cell($cell,'#E0FFDD',$allowed); |
$row_html .= &html_editable_cell($cell,'#E0FFDD',$allowed, |
|
$self->{outputmode} eq 'source'); |
} |
} |
$row_html .= '</td>'; |
$row_html .= '</td>'; |
} |
} |
Line 1355 sub output_options {
|
Line 1374 sub output_options {
|
description => 'HTML'}, |
description => 'HTML'}, |
{value => 'excel', |
{value => 'excel', |
description => 'Excel'}, |
description => 'Excel'}, |
|
{value => 'source', |
|
description => 'Show Source'}, |
# {value => 'xml', |
# {value => 'xml', |
# description => 'XML'}, |
# description => 'XML'}, |
{value => 'csv', |
{value => 'csv', |