[LON-CAPA-cvs] cvs: loncom /homework chemresponse.pm /interface lonprintout.pm

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 10 Nov 2003 23:26:42 -0000


albertel		Mon Nov 10 18:26:42 2003 EDT

  Modified files:              
    /loncom/interface	lonprintout.pm 
    /loncom/homework	chemresponse.pm 
  Log:
  - now uses the cgi_id generation routine
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.262 loncom/interface/lonprintout.pm:1.263
--- loncom/interface/lonprintout.pm:1.262	Thu Nov  6 14:23:02 2003
+++ loncom/interface/lonprintout.pm	Mon Nov 10 18:26:42 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.262 2003/11/06 19:23:02 sakharuk Exp $
+# $Id: lonprintout.pm,v 1.263 2003/11/10 23:26:42 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1088,7 +1088,7 @@
 	return SERVER_ERROR; 
     }
 
-    my $identifier = time.'_'.int(rand(1000));
+    my $identifier = &Apache::loncommon::get_cgi_id();
     &Apache::lonnet::appenv('cgi.'.$identifier.'.file'   => $filename,
                             'cgi.'.$identifier.'.layout'  => $laystyle,
                             'cgi.'.$identifier.'.numcol'  => $numberofcolumns,
Index: loncom/homework/chemresponse.pm
diff -u loncom/homework/chemresponse.pm:1.22 loncom/homework/chemresponse.pm:1.23
--- loncom/homework/chemresponse.pm:1.22	Tue Oct 21 16:58:29 2003
+++ loncom/homework/chemresponse.pm	Mon Nov 10 18:26:42 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # chemical equation style response
 #
-# $Id: chemresponse.pm,v 1.22 2003/10/21 20:58:29 albertel Exp $
+# $Id: chemresponse.pm,v 1.23 2003/11/10 23:26:42 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -208,7 +208,7 @@
 	my $width=&Apache::lonxml::get_param('width',$parstack,$safeeval);
 	my $molecule=&Apache::lonxml::get_param('molecule',$parstack,$safeeval);
 	my $options=&Apache::lonxml::get_param('options',$parstack,$safeeval);
-	my $id=time.'_'.int(rand(1000));
+	my $id=&Apache::loncommon::get_cgi_id();
 	$result="<img src='/cgi-bin/convertjme.pl?$id'";
 	if ($options =~ /border/) { $result.= ' border="1"'; }
 	$result.=' />';