version 1.180, 2010/05/24 09:21:18
|
version 1.182, 2010/10/31 15:54:25
|
Line 571 sub process {
|
Line 571 sub process {
|
# 4: Render the current state to the screen as an HTML page. |
# 4: Render the current state to the screen as an HTML page. |
sub display { |
sub display { |
my $self = shift; |
my $self = shift; |
|
my $footer = shift; |
my $state = $self->{STATES}{$self->{STATE}}; |
my $state = $self->{STATES}{$self->{STATE}}; |
|
|
my $result = ""; |
my $result = ""; |
Line 606 sub display {
|
Line 606 sub display {
|
# FIXME: This should be parameterized, not concatenated - Jeremy |
# FIXME: This should be parameterized, not concatenated - Jeremy |
|
|
|
|
if (!$state->overrideForm()) { $result.='<form name="helpform" method="post">'; } |
if (!$state->overrideForm()) { $result.='<form name="helpform" method="post" action="">'; } |
if ($stateHelp) { |
if ($stateHelp) { |
$stateHelp = &Apache::loncommon::help_open_topic($stateHelp); |
$stateHelp = &Apache::loncommon::help_open_topic($stateHelp); |
} |
} |
Line 661 sub display {
|
Line 661 sub display {
|
</form> |
</form> |
FOOTER |
FOOTER |
|
|
$result .= &Apache::loncommon::end_page(); |
$result .= $footer.&Apache::loncommon::end_page(); |
# Handle writing out the vars to the file |
# Handle writing out the vars to the file |
my $file = Apache::File->new('>'.$self->{FILENAME}); |
my $file = Apache::File->new('>'.$self->{FILENAME}); |
print $file $self->_varsInFile(); |
print $file $self->_varsInFile(); |
Line 1476 BUTTONS
|
Line 1476 BUTTONS
|
HTML::Entities::encode($choice->[1],"<>&\"'") |
HTML::Entities::encode($choice->[1],"<>&\"'") |
. "'"; |
. "'"; |
if ($checkedChoices{$choice->[1]}) { |
if ($checkedChoices{$choice->[1]}) { |
$result .= " checked='checked' "; |
$result .= " checked='checked'"; |
} |
} |
$result .= qq{id="id$id"}; |
$result .= qq{ id="id$id"}; |
my $choiceLabel = $choice->[0]; |
my $choiceLabel = $choice->[0]; |
if ($choice->[3]) { # if we need to evaluate this choice |
if ($choice->[3]) { # if we need to evaluate this choice |
$choiceLabel = "sub { my $helper = shift; my $state = shift;" . |
$choiceLabel = "sub { my $helper = shift; my $state = shift;" . |
Line 1486 BUTTONS
|
Line 1486 BUTTONS
|
$choiceLabel = eval($choiceLabel); |
$choiceLabel = eval($choiceLabel); |
$choiceLabel = &$choiceLabel($helper, $self); |
$choiceLabel = &$choiceLabel($helper, $self); |
} |
} |
$result .= "/></td><td> ".qq{<label for="id$id">}. |
$result .= " /></td><td> ".qq{<label for="id$id">}. |
$choiceLabel. "</label></td>"; |
$choiceLabel. "</label></td>"; |
if ($choice->[4]) { |
if ($choice->[4]) { |
$result .='<td><input type="text" size="5" name="' |
$result .='<td><input type="text" size="5" name="' |
Line 3364 sub render {
|
Line 3364 sub render {
|
$result .= '<p><font color="#FF0000">' . $self->{ERROR_MSG} . '</font></p>'; |
$result .= '<p><font color="#FF0000">' . $self->{ERROR_MSG} . '</font></p>'; |
} |
} |
|
|
$result .= '<input type="string" name="' . $self->{'variable'} . '_forminput"'; |
$result .= '<input type="text" name="' . $self->{'variable'} . '_forminput"'; |
|
|
if (defined($self->{'size'})) { |
if (defined($self->{'size'})) { |
$result .= ' size="' . $self->{'size'} . '"'; |
$result .= ' size="' . $self->{'size'} . '"'; |