[LON-CAPA-cvs] cvs: loncom /homework optionresponse.pm
sakharuk
lon-capa-cvs@mail.lon-capa.org
Tue, 01 Jul 2003 20:12:55 -0000
sakharuk Tue Jul 1 16:12:55 2003 EDT
Modified files:
/loncom/homework optionresponse.pm
Log:
Bug 1667 is fixed. Internal counter (works only for bubblesheet LaTeX exams) is implemented.
Index: loncom/homework/optionresponse.pm
diff -u loncom/homework/optionresponse.pm:1.78 loncom/homework/optionresponse.pm:1.79
--- loncom/homework/optionresponse.pm:1.78 Tue May 27 09:56:21 2003
+++ loncom/homework/optionresponse.pm Tue Jul 1 16:12:55 2003
@@ -1,7 +1,7 @@
# LearningOnline Network with CAPA
# option list style responses
#
-# $Id: optionresponse.pm,v 1.78 2003/05/27 13:56:21 sakharuk Exp $
+# $Id: optionresponse.pm,v 1.79 2003/07/01 20:12:55 sakharuk Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -291,7 +291,7 @@
my @names = @{ $Apache::response::foilgroup{'names'} };
my @truelist;
my @falselist;
- my $result;
+ my $result;
my $name;
my $displayoptionintex=0;
my @alphabet = ('A'..'Z');
@@ -340,6 +340,7 @@
} else {
my $temp=1;
my %lastresponse=&Apache::lonnet::str2hash($Apache::lonhomework::history{"resource.$part.$id.submission"});
+ my $internal_counter=$Apache::lonxml::counter;
foreach $name (@whichopt) {
my $text=$Apache::response::foilgroup{$name.'.text'};
if ($text!~/^\s*$/) {
@@ -394,8 +395,8 @@
}
}
if ($Apache::lonhomework::type eq 'exam') {
- $result.='\vskip -2 mm\parbox{\textwidth}{\begin{enumerate}\item[\textbf{'.$Apache::lonxml::counter.'}.]\parbox{\textwidth - 5 mm}{'.&bubbles(\@alphabet,\@opt).'}\end{enumerate}} \vskip -9 mm \strut ';
-# $Apache::lonxml::counter++;
+ $result.='\vskip -2 mm\parbox{\textwidth}{\begin{enumerate}\item[\textbf{'.$internal_counter.'}.]\parbox{\textwidth - 5 mm}{'.&bubbles(\@alphabet,\@opt).'}\end{enumerate}} \vskip -9 mm \strut ';
+ $internal_counter++;
}
$displayoptionintex=1;
} else {
@@ -415,8 +416,8 @@
}
}
if ($Apache::lonhomework::type eq 'exam') {
- $result.='\vskip -2 mm \parbox{\textwidth}{\begin{enumerate}\item[\textbf{'.$Apache::lonxml::counter.'}.]\parbox{\textwidth - 5 mm}{'.&bubbles(\@alphabet,\@opt).'}\end{enumerate}} \vskip -9 mm \strut ';
-# $Apache::lonxml::counter++;
+ $result.='\vskip -2 mm \parbox{\textwidth}{\begin{enumerate}\item[\textbf{'.$internal_counter.'}.]\parbox{\textwidth - 5 mm}{'.&bubbles(\@alphabet,\@opt).'}\end{enumerate}} \vskip -9 mm \strut ';
+ $internal_counter++;
}
}
}