[LON-CAPA-cvs] cvs: loncom /publisher lonconstruct.pm lonpubdir.pm

taceyjo1 lon-capa-cvs@mail.lon-capa.org
Sat, 18 Oct 2003 17:17:12 -0000


taceyjo1		Sat Oct 18 13:17:12 2003 EDT

  Modified files:              
    /loncom/publisher	lonconstruct.pm lonpubdir.pm 
  Log:
  Just adding support for some decompression, nothing very exciting :)
  
  
Index: loncom/publisher/lonconstruct.pm
diff -u loncom/publisher/lonconstruct.pm:1.14 loncom/publisher/lonconstruct.pm:1.15
--- loncom/publisher/lonconstruct.pm:1.14	Sat Sep 20 23:32:06 2003
+++ loncom/publisher/lonconstruct.pm	Sat Oct 18 13:17:12 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Construction Space Page Wrapper for Construction
 #
-# $Id: lonconstruct.pm,v 1.14 2003/09/21 03:32:06 taceyjo1 Exp $
+# $Id: lonconstruct.pm,v 1.15 2003/10/18 17:17:12 taceyjo1 Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -45,7 +45,7 @@
 use Apache::Log ();
 use HTML::Entities();
 
-my $DEBUG = 0;
+my $DEBUG = 1;
 =pod
 
 =item Debug($request, $message)
@@ -104,7 +104,7 @@
    $lowerframe=~s/^\//\/\~/;
    &Debug($r, "Lower frame URL afer ~ subst: ".$lowerframe);
    $lowerframe= &HTML::Entities::encode($lowerframe);
-   &Debug($r, "LOwer frame URL after quote subst: ".$lowerframe);
+   &Debug($r, "Lower frame URL after quote subst: ".$lowerframe);
 
 #
 # Are we forcing edit mode?
@@ -120,7 +120,11 @@
    if ($ENV{'form.forceColoredit'}) {
        $lowerframe.='?editmode=Edit&problemmode=Edit';
    }
-
+   &Apache::loncommon::get_unprocessed_cgi
+	($ENV{'QUERY_STRING'},['decompress']);
+   if ($ENV{'form.decompress'}) {
+       $lowerframe='http://$ENV{'SERVER_NAME'}/cgi-bin/decompress.pl?something';
+   }
    $r->print(<<ENDPAGE);
 <html>
 <head><title>LON-CAPA Construction Space</title>
Index: loncom/publisher/lonpubdir.pm
diff -u loncom/publisher/lonpubdir.pm:1.42 loncom/publisher/lonpubdir.pm:1.43
--- loncom/publisher/lonpubdir.pm:1.42	Sat Oct  4 16:49:40 2003
+++ loncom/publisher/lonpubdir.pm	Sat Oct 18 13:17:12 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Construction Space Directory Lister
 #
-# $Id: lonpubdir.pm,v 1.42 2003/10/04 20:49:40 www Exp $
+# $Id: lonpubdir.pm,v 1.43 2003/10/18 17:17:12 taceyjo1 Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -335,6 +335,9 @@
     if ($filename=~/\.(problem|exam|quiz|assess|survey|form|library)$/) {
 	$editlink=' (<a href="'.$linkdir.'/'.$filename.'?forceedit=1" target="_top">'.&mt('EditXML').'</a>)';
 	$editlink2=' (<a href="'.$linkdir.'/'.$filename.'?forceColoredit=1" target="_top">'.&mt('Edit').'</a>)';
+    }
+    if ($filename=~/\.(zip|tar|bz2|gz|tar.gz|tar.bz2|tgz)$/) {
+	$editlink=' (<a href="'.$linkdir.'/'.$filename.'?decompress=1" target="_top">'.&mt('Decompress').'</a>)';
     }
     $r->print('<tr bgcolor="'.$bgcolor.'">'.
 	      '<td><a target="_parent" href="/adm/publish?filename=/~'.