[LON-CAPA-cvs] cvs: loncom /homework matchresponse.pm rankresponse.pm

bisitz bisitz at source.lon-capa.org
Thu Feb 27 09:41:34 EST 2014


bisitz		Thu Feb 27 14:41:34 2014 EDT

  Modified files:              
    /loncom/homework	matchresponse.pm rankresponse.pm 
  Log:
  Bug #6694 - Proper display of student's submission on previous tries screen for matchresponse, optionresponse, rankresponse
  
  
  
Index: loncom/homework/matchresponse.pm
diff -u loncom/homework/matchresponse.pm:1.89 loncom/homework/matchresponse.pm:1.90
--- loncom/homework/matchresponse.pm:1.89	Tue Apr 30 03:03:34 2013
+++ loncom/homework/matchresponse.pm	Thu Feb 27 14:41:34 2014
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Full matching style response
 #
-# $Id: matchresponse.pm,v 1.89 2013/04/30 03:03:34 raeburn Exp $
+# $Id: matchresponse.pm,v 1.90 2014/02/27 14:41:34 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -580,7 +580,7 @@
     my $output;
     
     foreach my $name (@{ $foil_order }) {
-	my $item=shift(@items);
+	my $item = &HTML::Entities::encode(shift(@items),'<>&"');
 	$output .= '<tr><td>'.$item.'</td></tr>';
     }
     return if (!defined($output));
Index: loncom/homework/rankresponse.pm
diff -u loncom/homework/rankresponse.pm:1.69 loncom/homework/rankresponse.pm:1.70
--- loncom/homework/rankresponse.pm:1.69	Tue Apr 30 03:03:34 2013
+++ loncom/homework/rankresponse.pm	Thu Feb 27 14:41:34 2014
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # rank style response
 #
-# $Id: rankresponse.pm,v 1.69 2013/04/30 03:03:34 raeburn Exp $
+# $Id: rankresponse.pm,v 1.70 2014/02/27 14:41:34 bisitz Exp $
 # Copyright Michigan State University Board of Trustees
 #
 # This file is part of the LearningOnline Network with CAPA (LON-CAPA).
@@ -336,7 +336,7 @@
     my $output;
     foreach my $name (@{ $foil_order }) {
 	next if (!defined($lastresponse{$name}));
-	$output .= '<tr><td>'.$lastresponse{$name}.'</td></tr>';
+	$output .= '<tr><td>'.&HTML::Entities::encode($lastresponse{$name},'<>&"').'</td></tr>';
     }
     return if (!defined($output));
     $output =




More information about the LON-CAPA-cvs mailing list