[LON-CAPA-cvs] cvs: rat / lonratsrv.pm loncom/interface groupsort.pm londocs.pm

www lon-capa-cvs@mail.lon-capa.org
Fri, 21 Jul 2006 00:21:43 -0000


www		Thu Jul 20 20:21:43 2006 EDT

  Modified files:              
    /loncom/interface	groupsort.pm londocs.pm 
    /rat	lonratsrv.pm 
  Log:
  Bug #4931: clear out IMPORT shopping basket. Maybe overkill, but it seems to
  work.
  
  
Index: loncom/interface/groupsort.pm
diff -u loncom/interface/groupsort.pm:1.44 loncom/interface/groupsort.pm:1.45
--- loncom/interface/groupsort.pm:1.44	Mon Jun 19 05:40:17 2006
+++ loncom/interface/groupsort.pm	Thu Jul 20 20:21:28 2006
@@ -2,7 +2,7 @@
 # The LON-CAPA group sort handler
 # Allows for sorting prior to import into RAT.
 #
-# $Id: groupsort.pm,v 1.44 2006/06/19 09:40:17 www Exp $
+# $Id: groupsort.pm,v 1.45 2006/07/21 00:21:28 www Exp $
 # 
 # Copyright Michigan State University Board of Trustees
 #
@@ -211,6 +211,14 @@
     return ($shash,$thash);
 }
 
+# ---------------------------------------------------------- Clear the database
+
+sub clear_basket {
+    my $diropendb =
+       "/home/httpd/perl/tmp/$env{'user.domain'}_$env{'user.name'}_sel_res.db";
+    unlink ($diropendb);
+}                                                                                                         
+
 # ---------------------------------------------------------------- Main Handler
 sub handler {
     my $r = shift;
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.242 loncom/interface/londocs.pm:1.243
--- loncom/interface/londocs.pm:1.242	Thu Jul 20 16:42:48 2006
+++ loncom/interface/londocs.pm	Thu Jul 20 20:21:28 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.242 2006/07/20 20:42:48 www Exp $
+# $Id: londocs.pm,v 1.243 2006/07/21 00:21:28 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -42,7 +42,6 @@
 use GDBM_File;
 use Apache::lonlocal;
 use Cwd;
-use lib '/home/httpd/lib/perl/';
 use LONCAPA;
 
 my $iconpath;
@@ -1192,7 +1191,7 @@
 # Group import/search
 	    if ($env{'form.importdetail'}) {
 		my @imports;
-		&Apache::lonnet::logthis("imp detail ".$env{'form.importdetail'});
+#		&Apache::lonnet::logthis("imp detail ".$env{'form.importdetail'});
 		foreach (split(/\&/,$env{'form.importdetail'})) {
 		    if (defined($_)) {
 			my ($name,$url)=split(/\=/,$_);
Index: rat/lonratsrv.pm
diff -u rat/lonratsrv.pm:1.35 rat/lonratsrv.pm:1.36
--- rat/lonratsrv.pm:1.35	Tue Apr  4 11:32:12 2006
+++ rat/lonratsrv.pm	Thu Jul 20 20:21:42 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Server for RAT Maps
 #
-# $Id: lonratsrv.pm,v 1.35 2006/04/04 15:32:12 albertel Exp $
+# $Id: lonratsrv.pm,v 1.36 2006/07/21 00:21:42 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -33,6 +33,7 @@
 use Apache::File;
 use HTML::TokeParser;
 use Apache::lonnet;
+use Apache::groupsort();
 
 # ------------------------------------------------------------- From RAT to XML
 
@@ -311,6 +312,7 @@
 # -------------------------------------------- Cannot write to that file, error
         $errtext.='Map not saved: The specified path does not exist. ';
     }
+    &Apache::groupsort::clear_basket();
     return ($errtext,$infotext);
 }