[LON-CAPA-cvs] cvs: loncom /homework radiobuttonresponse.pm
sakharuk
lon-capa-cvs@mail.lon-capa.org
Wed, 02 Oct 2002 18:12:52 -0000
sakharuk Wed Oct 2 14:12:52 2002 EDT
Modified files:
/loncom/homework radiobuttonresponse.pm
Log:
Prints exams now.
Index: loncom/homework/radiobuttonresponse.pm
diff -u loncom/homework/radiobuttonresponse.pm:1.53 loncom/homework/radiobuttonresponse.pm:1.54
--- loncom/homework/radiobuttonresponse.pm:1.53 Thu Sep 26 17:45:53 2002
+++ loncom/homework/radiobuttonresponse.pm Wed Oct 2 14:12:51 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# mutliple choice style responses
#
-# $Id: radiobuttonresponse.pm,v 1.53 2002/09/26 21:45:53 albertel Exp $
+# $Id: radiobuttonresponse.pm,v 1.54 2002/10/02 18:12:51 sakharuk Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -359,7 +359,7 @@
}
}
} else {
- my $temp=0;
+ my $temp=0;
my $id=$Apache::inputtags::response['-1'];
my $part=$Apache::inputtags::part;
my $lastresponse=$Apache::lonhomework::history{"resource.$part.$id.submission"};
@@ -369,8 +369,14 @@
$result.="<br /><input type=\"radio\" name=\"HWVAL$Apache::inputtags::response['-1']\" value=\"$temp\" ";
if (defined($lastresponse{$name})) { $result .= 'checked="on"'; }
$result .= '>'.$Apache::response::foilgroup{$name.'.text'}."</input>\n";
+ $result .= '<table border="1"><tr><td>A: Correct</td><td>B: Incorrect</td></tr></table>';
} else {
$result .= '\item '.$Apache::response::foilgroup{$name.'.text'};
+ if ($Apache::lonhomework::type eq 'exam') {
+ $result.= '\vskip 2 mm \noindent \begin{tabular}{|lr|lr|}\hline ';
+ $result.= 'A: & Correct & B: & Incorrect';
+ $result.='\\\\\hline\end{tabular}\vskip 0 mm ';
+ }
}
$temp++;
}