[LON-CAPA-cvs] cvs: loncom /interface/statistics lonproblemanalysis.pm
matthew
lon-capa-cvs@mail.lon-capa.org
Fri, 30 Jan 2004 16:31:36 -0000
matthew Fri Jan 30 11:31:36 2004 EDT
Modified files:
/loncom/interface/statistics lonproblemanalysis.pm
Log:
Bug 2675: html entities not handled correctly in option response analysis
display of concepts and options. Can go in 1.1.2 without issues.
Index: loncom/interface/statistics/lonproblemanalysis.pm
diff -u loncom/interface/statistics/lonproblemanalysis.pm:1.62 loncom/interface/statistics/lonproblemanalysis.pm:1.63
--- loncom/interface/statistics/lonproblemanalysis.pm:1.62 Wed Jan 28 09:53:34 2004
+++ loncom/interface/statistics/lonproblemanalysis.pm Fri Jan 30 11:31:36 2004
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lonproblemanalysis.pm,v 1.62 2004/01/28 14:53:34 matthew Exp $
+# $Id: lonproblemanalysis.pm,v 1.63 2004/01/30 16:31:36 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1313,18 +1313,18 @@
if (@Concepts > 1) {
$table .= '<tr>'.
'<td>'.$conceptindex.'</td>'.
- '<td>'.$concept->{'name'}.'</td>'.
+ '<td>'.&HTML::Entities::encode($concept->{'name'}).'</td>'.
'<td>'.$foilindex++.'</td>'.
- '<td>'.$Foildata{$firstfoil}->{'name'}.'</td>'.
- '<td>'.$Foildata{$firstfoil}->{'text'}.'</td>'.
- '<td>'.$Foildata{$firstfoil}->{'value'}.'</td>'.
+ '<td>'.&HTML::Entities::encode($Foildata{$firstfoil}->{'name'}).'</td>'.
+ '<td>'.&HTML::Entities::encode($Foildata{$firstfoil}->{'text'}).'</td>'.
+ '<td>'.&HTML::Entities::encode($Foildata{$firstfoil}->{'value'}).'</td>'.
"</tr>\n";
} else {
$table .= '<tr>'.
'<td>'.$foilindex++.'</td>'.
- '<td>'.$Foildata{$firstfoil}->{'name'}.'</td>'.
- '<td>'.$Foildata{$firstfoil}->{'text'}.'</td>'.
- '<td>'.$Foildata{$firstfoil}->{'value'}.'</td>'.
+ '<td>'.&HTML::Entities::encode($Foildata{$firstfoil}->{'name'}).'</td>'.
+ '<td>'.&HTML::Entities::encode($Foildata{$firstfoil}->{'text'}).'</td>'.
+ '<td>'.&HTML::Entities::encode($Foildata{$firstfoil}->{'value'}).'</td>'.
"</tr>\n";
}
foreach my $foilid (@FoilsInConcept) {
@@ -1333,16 +1333,16 @@
'<td></td>'.
'<td></td>'.
'<td>'.$foilindex.'</td>'.
- '<td>'.$Foildata{$foilid}->{'name'}.'</td>'.
- '<td>'.$Foildata{$foilid}->{'text'}.'</td>'.
- '<td>'.$Foildata{$foilid}->{'value'}.'</td>'.
+ '<td>'.&HTML::Entities::encode($Foildata{$foilid}->{'name'}).'</td>'.
+ '<td>'.&HTML::Entities::encode($Foildata{$foilid}->{'text'}).'</td>'.
+ '<td>'.&HTML::Entities::encode($Foildata{$foilid}->{'value'}).'</td>'.
"</tr>\n";
} else {
$table .= '<tr>'.
'<td>'.$foilindex.'</td>'.
- '<td>'.$Foildata{$foilid}->{'name'}.'</td>'.
- '<td>'.$Foildata{$foilid}->{'text'}.'</td>'.
- '<td>'.$Foildata{$foilid}->{'value'}.'</td>'.
+ '<td>'.&HTML::Entities::encode($Foildata{$foilid}->{'name'}).'</td>'.
+ '<td>'.&HTML::Entities::encode($Foildata{$foilid}->{'text'}).'</td>'.
+ '<td>'.&HTML::Entities::encode($Foildata{$foilid}->{'value'}).'</td>'.
"</tr>\n";
}
} continue {
@@ -1367,7 +1367,7 @@
'<tr>'.
'<td bgcolor="'.$plotcolors->[$optionindex++].'">'.
(' 'x4).'</td>'.
- '<td>'.$option.'</td>'.
+ '<td>'.&HTML::Entities::encode($option).'</td>'.
"</tr>\n");
}
shift(@Rows); # Throw away 'correct option chosen' color