version 1.64, 2004/02/27 19:51:46
|
version 1.67, 2004/03/31 05:23:59
|
Line 230 my $paramHash;
|
Line 230 my $paramHash;
|
# In the debugger, this means that breakpoints are ignored until you step into |
# In the debugger, this means that breakpoints are ignored until you step into |
# a function and get out of what must be a "faked up scope" in the Apache-> |
# a function and get out of what must be a "faked up scope" in the Apache-> |
# mod_perl connection. In this code, it was manifesting itself in the existence |
# mod_perl connection. In this code, it was manifesting itself in the existence |
# of two seperate file-scoped $helper variables, one set to the value of the |
# of two separate file-scoped $helper variables, one set to the value of the |
# helper in the helper constructor, and one referenced by the handler on the |
# helper in the helper constructor, and one referenced by the handler on the |
# "$helper->process()" line. Using the debugger, one could actually |
# "$helper->process()" line. Using the debugger, one could actually |
# see the two different $helper variables, as hashes at completely |
# see the two different $helper variables, as hashes at completely |
Line 462 sub _saveVars {
|
Line 462 sub _saveVars {
|
my $self = shift; |
my $self = shift; |
my $result = ""; |
my $result = ""; |
$result .= '<input type="hidden" name="CURRENT_STATE" value="' . |
$result .= '<input type="hidden" name="CURRENT_STATE" value="' . |
HTML::Entities::encode($self->{STATE}) . "\" />\n"; |
HTML::Entities::encode($self->{STATE},'<>&"') . "\" />\n"; |
$result .= '<input type="hidden" name="TOKEN" value="' . |
$result .= '<input type="hidden" name="TOKEN" value="' . |
$self->{TOKEN} . "\" />\n"; |
$self->{TOKEN} . "\" />\n"; |
$result .= '<input type="hidden" name="RETURN_PAGE" value="' . |
$result .= '<input type="hidden" name="RETURN_PAGE" value="' . |
HTML::Entities::encode($self->{RETURN_PAGE}) . "\" />\n"; |
HTML::Entities::encode($self->{RETURN_PAGE},'<>&"') . "\" />\n"; |
|
|
return $result; |
return $result; |
} |
} |
Line 1264 BUTTONS
|
Line 1264 BUTTONS
|
$result .= "<tr>\n<td width='20'> </td>\n"; |
$result .= "<tr>\n<td width='20'> </td>\n"; |
$result .= "<td valign='top'><input type='$type' name='$var.forminput'" |
$result .= "<td valign='top'><input type='$type' name='$var.forminput'" |
. "' value='" . |
. "' value='" . |
HTML::Entities::encode($choice->[1]) |
HTML::Entities::encode($choice->[1],'<>&"') |
. "'"; |
. "'"; |
if ($checkedChoices{$choice->[1]}) { |
if ($checkedChoices{$choice->[1]}) { |
$result .= " checked "; |
$result .= " checked "; |
Line 1419 sub render {
|
Line 1419 sub render {
|
$result .= "<select name='${var}.forminput'>\n"; |
$result .= "<select name='${var}.forminput'>\n"; |
foreach my $choice (@{$self->{CHOICES}}) { |
foreach my $choice (@{$self->{CHOICES}}) { |
$result .= "<option value='" . |
$result .= "<option value='" . |
HTML::Entities::encode($choice->[1]) |
HTML::Entities::encode($choice->[1],'<>&"') |
. "'"; |
. "'"; |
if ($checkedChoices{$choice->[1]}) { |
if ($checkedChoices{$choice->[1]}) { |
$result .= " selected"; |
$result .= " selected"; |
Line 1777 sub start_resource {
|
Line 1777 sub start_resource {
|
$paramHash->{'suppressEmptySequences'} = $token->[2]{'suppressEmptySequences'}; |
$paramHash->{'suppressEmptySequences'} = $token->[2]{'suppressEmptySequences'}; |
$paramHash->{'toponly'} = $token->[2]{'toponly'}; |
$paramHash->{'toponly'} = $token->[2]{'toponly'}; |
$paramHash->{'addstatus'} = $token->[2]{'addstatus'}; |
$paramHash->{'addstatus'} = $token->[2]{'addstatus'}; |
|
$paramHash->{'closeallpages'} = $token->[2]{'closeallpages'}; |
return ''; |
return ''; |
} |
} |
|
|
Line 1945 BUTTONS
|
Line 1946 BUTTONS
|
$checked = 1; |
$checked = 1; |
} |
} |
$col .= "value='" . |
$col .= "value='" . |
HTML::Entities::encode(&$valueFunc($resource)) |
HTML::Entities::encode(&$valueFunc($resource),'<>&"') |
. "' /></td>"; |
. "' /></td>"; |
return $col; |
return $col; |
} |
} |
Line 1962 BUTTONS
|
Line 1963 BUTTONS
|
'showParts' => 0, |
'showParts' => 0, |
'filterFunc' => $filterFunc, |
'filterFunc' => $filterFunc, |
'resource_no_folder_link' => 1, |
'resource_no_folder_link' => 1, |
|
'closeAllPages' => $self->{'closeallpages'}, |
'suppressEmptySequences' => $self->{'suppressEmptySequences'}, |
'suppressEmptySequences' => $self->{'suppressEmptySequences'}, |
'iterator_map' => $mapUrl } |
'iterator_map' => $mapUrl } |
); |
); |
Line 2190 BUTTONS
|
Line 2192 BUTTONS
|
$checked = 1; |
$checked = 1; |
} |
} |
$result .= |
$result .= |
" value='" . HTML::Entities::encode($choice->[0] . ':' . $choice->[2] . ':' . $choice->[1] . ':' . $choice->[3]) |
" value='" . HTML::Entities::encode($choice->[0] . ':' . $choice->[2] . ':' . $choice->[1] . ':' . $choice->[3],'<>&"') |
. "' /></td><td>" |
. "' /></td><td>" |
. HTML::Entities::encode($choice->[1]) |
. HTML::Entities::encode($choice->[1],'<>&"') |
. "</td><td align='center'>" |
. "</td><td align='center'>" |
. HTML::Entities::encode($choice->[2]) |
. HTML::Entities::encode($choice->[2],'<>&"') |
. "</td>\n<td>" |
. "</td>\n<td>" |
. HTML::Entities::encode($choice->[3]) |
. HTML::Entities::encode($choice->[3],'<>&"') |
. "</td>\n<td>" |
. "</td>\n<td>" |
. HTML::Entities::encode($choice->[4]) |
. HTML::Entities::encode($choice->[4],'<>&"') |
. "</td>\n<td>" |
. "</td>\n<td>" |
. HTML::Entities::encode($choice->[0]) |
. HTML::Entities::encode($choice->[0],'<>&"') |
. "</td></tr>\n"; |
. "</td></tr>\n"; |
} |
} |
|
|
Line 2496 BUTTONS
|
Line 2498 BUTTONS
|
} |
} |
$result .= '<tr><td align="right"' . " bgcolor='$color'>" . |
$result .= '<tr><td align="right"' . " bgcolor='$color'>" . |
"<input $onclick type='$type' name='" . $var |
"<input $onclick type='$type' name='" . $var |
. ".forminput' value='" . HTML::Entities::encode($fileName) . |
. ".forminput' value='" . HTML::Entities::encode($fileName,'<>&"'). |
"'"; |
"'"; |
if (!$self->{'multichoice'} && $choices == 0) { |
if (!$self->{'multichoice'} && $choices == 0) { |
$result .= ' checked'; |
$result .= ' checked'; |
Line 3164 sub render {
|
Line 3166 sub render {
|
$result .= "<li>for section <b>$section</b></li>"; |
$result .= "<li>for section <b>$section</b></li>"; |
$level -= 3; |
$level -= 3; |
$result .= "<input type='hidden' name='csec' value='" . |
$result .= "<input type='hidden' name='csec' value='" . |
HTML::Entities::encode($section) . "' />\n"; |
HTML::Entities::encode($section,'<>&"') . "' />\n"; |
} else { |
} else { |
# FIXME: This is probably wasteful! Store the name! |
# FIXME: This is probably wasteful! Store the name! |
my $classlist = Apache::loncoursedata::get_classlist(); |
my $classlist = Apache::loncoursedata::get_classlist(); |
Line 3176 sub render {
|
Line 3178 sub render {
|
$level -= 6; |
$level -= 6; |
my ($uname, $udom) = split /:/, $vars->{USER_NAME}; |
my ($uname, $udom) = split /:/, $vars->{USER_NAME}; |
$result .= "<input type='hidden' name='uname' value='". |
$result .= "<input type='hidden' name='uname' value='". |
HTML::Entities::encode($uname) . "' />\n"; |
HTML::Entities::encode($uname,'<>&"') . "' />\n"; |
$result .= "<input type='hidden' name='udom' value='". |
$result .= "<input type='hidden' name='udom' value='". |
HTML::Entities::encode($udom) . "' />\n"; |
HTML::Entities::encode($udom,'<>&"') . "' />\n"; |
} |
} |
|
|
# Print value |
# Print value |