[LON-CAPA-cvs] cvs: loncom /cgi graph.png /interface loncommon.pm

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 16 Oct 2003 20:03:31 -0000


albertel		Thu Oct 16 16:03:31 2003 EDT

  Modified files:              
    /loncom/interface	loncommon.pm 
    /loncom/cgi	graph.png 
  Log:
  - prependeding everything with cgi. to localize values
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.130 loncom/interface/loncommon.pm:1.131
--- loncom/interface/loncommon.pm:1.130	Thu Oct 16 15:59:00 2003
+++ loncom/interface/loncommon.pm	Thu Oct 16 16:03:31 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.130 2003/10/16 19:59:00 albertel Exp $
+# $Id: loncommon.pm,v 1.131 2003/10/16 20:03:31 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2713,13 +2713,13 @@
         $Max = int($Max);
     }
     #
-    &Apache::lonnet::appenv($identifier.'.title'   => $Title,
-                            $identifier.'.xlabel'  => $xlabel,
-                            $identifier.'.ylabel'  => $ylabel,
-                            $identifier.'.Max'     => $Max,
-                            $identifier.'.NumBars' => $NumBars,
-                            $identifier.'.NumSets' => $NumSets,
-                            $identifier.'.Colors'  => join(',',@{$colors}),
+    &Apache::lonnet::appenv('cgi.'.$identifier.'.title'   => $Title,
+                            'cgi.'.$identifier.'.xlabel'  => $xlabel,
+                            'cgi.'.$identifier.'.ylabel'  => $ylabel,
+                            'cgi.'.$identifier.'.Max'     => $Max,
+                            'cgi.'.$identifier.'.NumBars' => $NumBars,
+                            'cgi.'.$identifier.'.NumSets' => $NumSets,
+                            'cgi.'.$identifier.'.Colors'  => join(',',@{$colors}),
                             %ValuesHash);
     return '<img src="/cgi-bin/graph.png?'.$identifier.'" border="1" />';
 }
Index: loncom/cgi/graph.png
diff -u loncom/cgi/graph.png:1.26 loncom/cgi/graph.png:1.27
--- loncom/cgi/graph.png:1.26	Thu Oct 16 15:54:42 2003
+++ loncom/cgi/graph.png	Thu Oct 16 16:03:31 2003
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 #
-# $Id: graph.png,v 1.26 2003/10/16 19:54:42 albertel Exp $
+# $Id: graph.png,v 1.27 2003/10/16 20:03:31 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -83,13 +83,13 @@
 
 $|=1;   # Autoflush after each print/write
 my $identifier = $ENV{'QUERY_STRING'};
-my $Title   = &unescape($ENV{$identifier.'.title'});
-my $xlabel  = &unescape($ENV{$identifier.'.xlabel'});
-my $ylabel  = &unescape($ENV{$identifier.'.ylabel'});
-my $Max     = $ENV{$identifier.'.Max'};
-my $NumBars = $ENV{$identifier.'.NumBars'};
-my $NumSets = $ENV{$identifier.'.NumSets'};
-my @Colors  = split(',',$ENV{$identifier.'.Colors'});
+my $Title   = &unescape($ENV{'cgi.'.$identifier.'.title'});
+my $xlabel  = &unescape($ENV{'cgi.'.$identifier.'.xlabel'});
+my $ylabel  = &unescape($ENV{'cgi.'.$identifier.'.ylabel'});
+my $Max     = $ENV{'cgi.'.$identifier.'.Max'};
+my $NumBars = $ENV{'cgi.'.$identifier.'.NumBars'};
+my $NumSets = $ENV{'cgi.'.$identifier.'.NumSets'};
+my @Colors  = split(',',$ENV{'cgi.'.$identifier.'.Colors'});
 
 #
 # Labels are always digits
@@ -100,7 +100,7 @@
 my @data;  # stores the data for the graph
 push(@data,\@xlabels);
 for (my $i=1;$i<=$NumSets;$i++) {
-    push(@data,[split(',',$ENV{$identifier.'.data.'.$i})]);
+    push(@data,[split(',',$ENV{'cgi.'.$identifier.'.data.'.$i})]);
 }
 
 my $skip_x = 1;