--- loncom/homework/response.pm 2003/04/30 21:23:45 1.74
+++ loncom/homework/response.pm 2003/05/13 15:27:01 1.75
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# various response type definitons response definition
#
-# $Id: response.pm,v 1.74 2003/04/30 21:23:45 albertel Exp $
+# $Id: response.pm,v 1.75 2003/05/13 15:27:01 sakharuk Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -363,12 +363,17 @@ sub setup_params {
sub answer_header {
my ($type) = @_;
my $result;
- if ($type eq 'optionresponse' || $type eq 'radiobuttonresponse' ) {
- $result = '
Answer for Part:'.
- $Apache::inputtags::part. ' |
---|
'."\n";
+ if ($ENV{'form.print_answer'} eq 'yes') {
+ $result = ' \vskip 0 mm \begin{tabular}{|c|}\hline Answer for Part: '.
+ $Apache::inputtags::part.' \\\\ \hline ';
} else {
- $result = 'Answer for Part:'.
- $Apache::inputtags::part. ' | '."\n";
+ if ($type eq 'optionresponse' || $type eq 'radiobuttonresponse' ) {
+ $result = 'Answer for Part:'.
+ $Apache::inputtags::part. ' |
---|
'."\n";
+ } else {
+ $result = 'Answer for Part:'.
+ $Apache::inputtags::part. ' | '."\n";
+ }
}
return $result;
}
@@ -376,10 +381,14 @@ sub answer_header {
sub answer_part {
my ($type,$answer) = @_;
my $result;
- if ($type eq 'optionresponse' || $type eq 'radiobuttonresponse') {
- $result = ''.$answer.' | ';
+ if ($ENV{'form.print_answer'} eq 'yes') {
+ $result = ' '.$answer.'\\\\ \hline ';
} else {
- $result = ''.$answer.' | ';
+ if ($type eq 'optionresponse' || $type eq 'radiobuttonresponse') {
+ $result = ''.$answer.' | ';
+ } else {
+ $result = ''.$answer.' | ';
+ }
}
return $result;
}
@@ -387,10 +396,14 @@ sub answer_part {
sub answer_footer {
my ($type) = @_;
my $result;
- if ($type eq 'optionresponse' || $type eq 'radiobuttonresponse') {
- $result = '
';
+ if ($ENV{'form.print_answer'} eq 'yes') {
+ $result = ' \end{tabular} \vskip 0 mm ';
} else {
- $result = '
';
+ if ($type eq 'optionresponse' || $type eq 'radiobuttonresponse') {
+ $result = '
';
+ } else {
+ $result = '
';
+ }
}
return $result;
}