[LON-CAPA-cvs] cvs: loncom /cgi decompress.pl graph.png loncgi.pm /homework convertjme.pl
albertel
lon-capa-cvs@mail.lon-capa.org
Wed, 25 May 2005 22:31:54 -0000
albertel Wed May 25 18:31:54 2005 EDT
Modified files:
/loncom/homework convertjme.pl
/loncom/cgi decompress.pl graph.png loncgi.pm
Log:
- some more $ENV -> $env ceanups
Index: loncom/homework/convertjme.pl
diff -u loncom/homework/convertjme.pl:1.14 loncom/homework/convertjme.pl:1.15
--- loncom/homework/convertjme.pl:1.14 Thu Apr 7 02:56:21 2005
+++ loncom/homework/convertjme.pl Wed May 25 18:31:51 2005
@@ -2,7 +2,7 @@
# The LearningOnline Network with CAPA
# Dynamically converts JME strings into either a png or ps file.
#
-# $Id: convertjme.pl,v 1.14 2005/04/07 06:56:21 albertel Exp $
+# $Id: convertjme.pl,v 1.15 2005/05/25 22:31:51 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -66,11 +66,11 @@
my ($id,$width,$ps,$png,@JMEstring);
if ($loncapa) {
$id=$ENV{'QUERY_STRING'};
- $width = $env{'cgi.'.$id.'.WIDTH'};
+ $width = $Apache::lonnet::env{'cgi.'.$id.'.WIDTH'};
if (!$width) { $width = 400; }
- $png = $env{'cgi.'.$id.'.PNG'};
- $ps = $env{'cgi.'.$id.'.PS'};
- @JMEstring=&unescape($env{'cgi.'.$id.'.JME'});
+ $png = $Apache::lonnet::env{'cgi.'.$id.'.PNG'};
+ $ps = $Apache::lonnet::env{'cgi.'.$id.'.PS'};
+ @JMEstring=&unescape($Apache::lonnet::env{'cgi.'.$id.'.JME'});
} else {
@JMEstring = @ARGV;
$width = shift @JMEstring;
Index: loncom/cgi/decompress.pl
diff -u loncom/cgi/decompress.pl:1.13 loncom/cgi/decompress.pl:1.14
--- loncom/cgi/decompress.pl:1.13 Thu Apr 7 02:56:21 2005
+++ loncom/cgi/decompress.pl Wed May 25 18:31:51 2005
@@ -40,8 +40,8 @@
END
} else {
print "Content-type: text/html\n\n";
- my $file=$env{'cgi.file'};
- my $dir=$env{'cgi.dir'};
+ my $file=$Apache::lonnet::env{'cgi.file'};
+ my $dir=$Apache::lonnet::env{'cgi.dir'};
if(! $file || ! $dir) {
print <<END;
<html><body>Bad Enviroment!</body></html>
Index: loncom/cgi/graph.png
diff -u loncom/cgi/graph.png:1.34 loncom/cgi/graph.png:1.35
--- loncom/cgi/graph.png:1.34 Thu Apr 7 02:56:21 2005
+++ loncom/cgi/graph.png Wed May 25 18:31:51 2005
@@ -1,6 +1,6 @@
#!/usr/bin/perl
#
-# $Id: graph.png,v 1.34 2005/04/07 06:56:21 albertel Exp $
+# $Id: graph.png,v 1.35 2005/05/25 22:31:51 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -92,8 +92,8 @@
# usage: &get_env($name,$default)
sub get_env {
my $key = 'cgi.'.$id.'.'.(shift());
- return shift if (! exists($env{$key}));
- return $env{$key};
+ return shift if (! exists($Apache::lonnet::env{$key}));
+ return $Apache::lonnet::env{$key};
}
if (! &LONCAPA::loncgi::check_cookie_and_load_env()) {
Index: loncom/cgi/loncgi.pm
diff -u loncom/cgi/loncgi.pm:1.4 loncom/cgi/loncgi.pm:1.5
--- loncom/cgi/loncgi.pm:1.4 Tue May 3 18:22:47 2005
+++ loncom/cgi/loncgi.pm Wed May 25 18:31:51 2005
@@ -1,7 +1,7 @@
#
# LON-CAPA helpers for cgi-bin scripts
#
-# $Id: loncgi.pm,v 1.4 2005/05/03 22:22:47 albertel Exp $
+# $Id: loncgi.pm,v 1.5 2005/05/25 22:31:51 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -52,16 +52,11 @@
use strict;
use warnings FATAL=>'all';
no warnings 'uninitialized';
-use vars qw(%env);
use CGI();
use CGI::Cookie();
use Fcntl qw(:flock);
use LONCAPA::Configuration();
-require Exporter;
-
-#our @ISA = qw (Exporter);
-#our @EXPORT = qw(%env);
my $lonidsdir;