Answer for Part:'.
+ $Apache::inputtags::part. ' | '."\n";
+ }
+ }
+ return $result;
}
-sub setup_params {
- my ($tag) = @_;
+sub answer_part {
+ my ($type,$answer) = @_;
+ my $result;
+ if ($ENV{'form.answer_output_mode'} eq 'tex') {
+ $result = ' '.$answer.'\\\\ \hline ';
+ } else {
+ if ($type eq 'optionresponse' || $type eq 'radiobuttonresponse') {
+ $result = ''.$answer.' | ';
+ } else {
+ $result = ''.$answer.' | ';
+ }
+ }
+ return $result;
+}
- @Apache::inputtags::params=();
- my %paramlist=();
- foreach my $key (keys(%Apache::lonnet::packagetab)) {
- if ($key =~ /^$tag/) {
- my ($package,$name) = split(/&/,$key);
- $paramlist{$name}=1;
- }
- }
- foreach my $key (keys(%paramlist)) {
- my $entry= 'resource.'.$Apache::inputtags::part;
- if (defined($Apache::inputtags::response[-1])) {
- $entry.='_'.$Apache::inputtags::response[-1];
+sub answer_footer {
+ my ($type) = @_;
+ my $result;
+ if ($ENV{'form.answer_output_mode'} eq 'tex') {
+ $result = ' \end{tabular} \vskip 0 mm ';
+ } else {
+ if ($type eq 'optionresponse' || $type eq 'radiobuttonresponse') {
+ $result = '