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

sakharuk lon-capa-cvs@mail.lon-capa.org
Mon, 28 Jul 2003 18:49:59 -0000


sakharuk		Mon Jul 28 14:49:59 2003 EDT

  Modified files:              
    /loncom/homework	optionresponse.pm 
  Log:
  Corrections to print optionresponse problems with or without list of options. 
  
  
Index: loncom/homework/optionresponse.pm
diff -u loncom/homework/optionresponse.pm:1.82 loncom/homework/optionresponse.pm:1.83
--- loncom/homework/optionresponse.pm:1.82	Fri Jul 25 16:56:08 2003
+++ loncom/homework/optionresponse.pm	Mon Jul 28 14:49:59 2003
@@ -1,7 +1,7 @@
 # LearningOnline Network with CAPA
 # option list style responses
 #
-# $Id: optionresponse.pm,v 1.82 2003/07/25 20:56:08 sakharuk Exp $
+# $Id: optionresponse.pm,v 1.83 2003/07/28 18:49:59 sakharuk Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -437,7 +437,7 @@
 sub optionlist_correction {
 
     my $texoptionlist = shift;
-    if ($texoptionlist=~/<option selected/) {
+    if ($texoptionlist=~/<option selected/ or $texoptionlist=~/<option>[^<]+<\/option>/) {
 	$texoptionlist =~ s/<option><\/option>/\\item \[\] Possible answers are:/;
 	$texoptionlist =~ s/<option>/\{\\bf /g;
 	$texoptionlist =~ s/<option selected="on">/\{\\bf /g;