[LON-CAPA-cvs] cvs: loncom /homework matchresponse.pm optionresponse.pm rankresponse.pm

albertel lon-capa-cvs@mail.lon-capa.org
Wed, 26 Mar 2003 22:59:09 -0000


albertel		Wed Mar 26 17:59:09 2003 EDT

  Modified files:              
    /loncom/homework	rankresponse.pm matchresponse.pm optionresponse.pm 
  Log:
  - removing lame global
  
  
Index: loncom/homework/rankresponse.pm
diff -u loncom/homework/rankresponse.pm:1.9 loncom/homework/rankresponse.pm:1.10
--- loncom/homework/rankresponse.pm:1.9	Wed Mar 26 13:43:29 2003
+++ loncom/homework/rankresponse.pm	Wed Mar 26 17:59:09 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # rank style response
 #
-# $Id: rankresponse.pm,v 1.9 2003/03/26 18:43:29 sakharuk Exp $
+# $Id: rankresponse.pm,v 1.10 2003/03/26 22:59:09 albertel Exp $
 # Copyright Michigan State University Board of Trustees
 #
 # This file is part of the LearningOnline Network with CAPA (LON-CAPA).
@@ -31,8 +31,6 @@
 use HTML::Entities();
 use Apache::optionresponse;
 
-my $flag_for_exam_printing = 1;
-
 BEGIN {
     &Apache::lonxml::register('Apache::rankresponse',('rankresponse'));
 }
@@ -468,9 +466,8 @@
 	    } else {
 		push @{ $Apache::response::foilgroup{'names'} }, $name;
 		$Apache::response::foilgroup{"$name.value"} = $value;
-		if ($target eq 'tex' and $Apache::lonhomework::type eq 'exam' and $flag_for_exam_printing) {
+		if ($target eq 'tex' and $Apache::lonhomework::type eq 'exam') {
 		    $Apache::response::foilgroup{"$name.text"} = '\vskip 5 mm $\triangleright$ '.$text;
-		    $flag_for_exam_printing = 0;
 		} else {
 		    if ($target eq 'tex') {
 			$Apache::response::foilgroup{"$name.text"} = ' $\triangleright$ '.$text;
Index: loncom/homework/matchresponse.pm
diff -u loncom/homework/matchresponse.pm:1.15 loncom/homework/matchresponse.pm:1.16
--- loncom/homework/matchresponse.pm:1.15	Wed Mar 26 17:41:34 2003
+++ loncom/homework/matchresponse.pm	Wed Mar 26 17:59:09 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Full matching style response
 #
-# $Id: matchresponse.pm,v 1.15 2003/03/26 22:41:34 albertel Exp $
+# $Id: matchresponse.pm,v 1.16 2003/03/26 22:59:09 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -33,8 +33,6 @@
 use Math::Random();
 use Apache::optionresponse;
 
-my $flag_for_exam_printing = 1;
-
 BEGIN {
     &Apache::lonxml::register('Apache::matchresponse',('matchresponse'));
 }
@@ -421,8 +419,8 @@
 		if ($Apache::lonhomework::type eq 'exam') {
 		    $question.=' '.$optionlist.$text."\n";
 		    my @emptyItems = ();
-		    for (my $i=0;$i<=$#Items;$i++) {push @emptyItems, ' ';}
-		    $question.='\vskip -2 mm\parbox{\textwidth}{\begin{enumerate}\item[\textbf{'.$Apache::lonxml::counter.'}.]\parbox{\textwidth - 5 mm}{'.&Apache::optionresponse::bubbles(\@used_letters,\@empthItems).'}\end{enumerate}} \vskip -10 mm \strut ';
+		    for (my $i=0;$i<=$#used_letters;$i++) {push @emptyItems, ' ';}
+		    $question.='\vskip -2 mm\parbox{\textwidth}{\begin{enumerate}\item[\textbf{'.$Apache::lonxml::counter.'}.]\parbox{\textwidth - 5 mm}{'.&Apache::optionresponse::bubbles(\@used_letters,\@emptyItems).'}\end{enumerate}} \vskip -10 mm \strut ';
 	        } else {
 		    $question.=' \\\\ '.$optionlist.$text."\n";
 		}
@@ -620,7 +618,7 @@
 	    } else {
 		push @{ $Apache::response::foilgroup{'names'} }, $name;
 		$Apache::response::foilgroup{"$name.value"} = $value;
-		if ($Apache::lonhomework::type eq 'exam' and $flag_for_exam_printing) {
+		if ($Apache::lonhomework::type eq 'exam') {
 		    $Apache::response::foilgroup{"$name.text"} = '\vskip 5 mm $\triangleright$ '.$text;
 		} else {
 		    if ($target eq 'tex') {
Index: loncom/homework/optionresponse.pm
diff -u loncom/homework/optionresponse.pm:1.69 loncom/homework/optionresponse.pm:1.70
--- loncom/homework/optionresponse.pm:1.69	Wed Mar 26 13:42:29 2003
+++ loncom/homework/optionresponse.pm	Wed Mar 26 17:59:09 2003
@@ -1,7 +1,7 @@
 # LearningOnline Network with CAPA
 # option list style responses
 #
-# $Id: optionresponse.pm,v 1.69 2003/03/26 18:42:29 sakharuk Exp $
+# $Id: optionresponse.pm,v 1.70 2003/03/26 22:59:09 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -31,8 +31,6 @@
 use strict;
 use Apache::response;
 
-my $flag_for_exam_printing = 1;
-
 BEGIN {
   &Apache::lonxml::register('Apache::optionresponse',('optionresponse'));
 }
@@ -633,7 +631,7 @@
 	   && !&Apache::response::showallfoils() ) {
 	push @{ $Apache::response::conceptgroup{'names'} }, $name;
 	$Apache::response::conceptgroup{"$name.value"} = $value;
-	if ($target eq 'tex' and $Apache::lonhomework::type eq 'exam' and $flag_for_exam_printing) {
+	if ($target eq 'tex' and $Apache::lonhomework::type eq 'exam') {
 	    $Apache::response::conceptgroup{"$name.text"} = '\vskip 4 mm $\triangleright$ '.$text;
 	} else {
 	    if ($target eq 'tex') {
@@ -646,7 +644,7 @@
       } else {
 	push @{ $Apache::response::foilgroup{'names'} }, $name;
 	$Apache::response::foilgroup{"$name.value"} = $value;
-	if ($Apache::lonhomework::type eq 'exam' and $flag_for_exam_printing) {
+	if ($Apache::lonhomework::type eq 'exam') {
 	    $Apache::response::foilgroup{"$name.text"} = '\vskip 5 mm $\triangleright$ '.$text;
 	} else {
 	    if ($target eq 'tex') {