[LON-CAPA-cvs] cvs: loncom /homework optionresponse.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Sun, 19 Jan 2003 08:10:22 -0000
albertel Sun Jan 19 03:10:22 2003 EDT
Modified files:
/loncom/homework optionresponse.pm
Log:
- preventing more possible bombs on incomplete problems
Index: loncom/homework/optionresponse.pm
diff -u loncom/homework/optionresponse.pm:1.66 loncom/homework/optionresponse.pm:1.67
--- loncom/homework/optionresponse.pm:1.66 Mon Jan 13 16:24:39 2003
+++ loncom/homework/optionresponse.pm Sun Jan 19 03:10:22 2003
@@ -1,7 +1,7 @@
# LearningOnline Network with CAPA
# option list style responses
#
-# $Id: optionresponse.pm,v 1.66 2003/01/13 21:24:39 sakharuk Exp $
+# $Id: optionresponse.pm,v 1.67 2003/01/19 08:10:22 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -248,6 +248,7 @@
my ($max,$randomize)=@_;
$max = &getfoilcounts($max);
&Apache::lonxml::debug("randomize $randomize");
+ if (!defined(@{ $Apache::response::foilgroup{'names'} })) {return;}
my @names = @{ $Apache::response::foilgroup{'names'} };
my @whichopt =();
my (%top,@toplist,%bottom,@bottomlist);
@@ -294,6 +295,7 @@
sub displayanswers {
my ($max,$randomize,@opt)=@_;
+ if (!defined(@{ $Apache::response::foilgroup{'names'} })) {return;}
my @names = @{ $Apache::response::foilgroup{'names'} };
my @whichopt = &whichfoils($max,$randomize);
my $result=&Apache::response::answer_header('optionresponse');
@@ -307,6 +309,7 @@
sub displayfoils {
my ($target,$max,$randomize,@opt)=@_;
+ if (!defined(@{ $Apache::response::foilgroup{'names'} })) {return;}
my @names = @{ $Apache::response::foilgroup{'names'} };
my @truelist;
my @falselist;