[LON-CAPA-cvs] cvs: loncom /homework grades.pm inputtags.pm

albertel lon-capa-cvs-allow@mail.lon-capa.org
Thu, 01 Nov 2007 20:56:53 -0000


albertel		Thu Nov  1 16:56:53 2007 EDT

  Modified files:              
    /loncom/homework	grades.pm inputtags.pm 
  Log:
  - BUG#5504 - previous tries links when PGRDing multiple sutudents would only show last student previosu tries
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.474 loncom/homework/grades.pm:1.475
--- loncom/homework/grades.pm:1.474	Wed Oct 31 20:47:42 2007
+++ loncom/homework/grades.pm	Thu Nov  1 16:56:51 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.474 2007/11/01 00:47:42 albertel Exp $
+# $Id: grades.pm,v 1.475 2007/11/01 20:56:51 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1973,7 +1973,7 @@
 	    $mode='answer';
 	}
 	&Apache::lonxml::clear_problem_counter();
-	$request->print(&show_problem($request,$symb,$uname,$udom,1,1,$mode));
+	$request->print(&show_problem($request,$symb,$uname,$udom,1,1,$mode,{'request.prefix' => 'ctr'.$counter}));
     }
 
     my %record = &Apache::lonnet::restore($symb,$env{'request.course.id'},$udom,$uname);
Index: loncom/homework/inputtags.pm
diff -u loncom/homework/inputtags.pm:1.233 loncom/homework/inputtags.pm:1.234
--- loncom/homework/inputtags.pm:1.233	Tue Oct 16 20:22:51 2007
+++ loncom/homework/inputtags.pm	Thu Nov  1 16:56:51 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # input  definitons
 #
-# $Id: inputtags.pm,v 1.233 2007/10/17 00:22:51 albertel Exp $
+# $Id: inputtags.pm,v 1.234 2007/11/01 20:56:51 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1299,7 +1299,7 @@
     my $prefix = $env{'form.request.prefix'};
     $prefix =~ tr{.}{_};
     my $function_name = "LONCAPA_previous_tries_".$prefix.
-	$Apache::lonxml::curdepth;
+	$Apache::lonxml::curdepth.'_'.$env{'form.counter'};
     my $result ="<script type=\"text/javascript\">
 // <![CDATA[
     function $function_name() {newWindow=open('','new_W','width=500,height=500,scrollbars=1,resizable=yes');newWindow.$windowopen;newWindow.document.writeln('$start_page $output $end_page');newWindow.document.close();newWindow.focus()}