--- loncom/homework/grades.pm 2009/03/06 16:13:29 1.554
+++ loncom/homework/grades.pm 2009/03/06 21:14:50 1.555
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.554 2009/03/06 16:13:29 raeburn Exp $
+# $Id: grades.pm,v 1.555 2009/03/06 21:14:50 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -268,9 +268,12 @@ sub reset_caches {
sub get_radiobutton_correct_foil {
my ($partid,$respid,$symb,$uname,$udom)=@_;
my $analyze = &get_analyze($symb,$uname,$udom);
- foreach my $foil (@{&get_order($partid,$respid,$symb,$uname,$udom)}) {
- if ($analyze->{"$partid.$respid.foil.value.$foil"} eq 'true') {
- return $foil;
+ my $foils = &get_order($partid,$respid,$symb,$uname,$udom);
+ if (ref($foils) eq 'ARRAY') {
+ foreach my $foil (@{$foils}) {
+ if ($analyze->{"$partid.$respid.foil.value.$foil"} eq 'true') {
+ return $foil;
+ }
}
}
}
@@ -2127,7 +2130,7 @@ KEYWORDS
}
$lastsubonly.=''.&mt('Submitted Answer:').' '.
&cleanRecord($subval,$responsetype,$symb,$partid,
- $respid,\%record,$order);
+ $respid,\%record,$order,undef,$uname,$udom);
if ($similar) {$lastsubonly.="
$similar\n";}
$lastsubonly.='';
}