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

albertel lon-capa-cvs-allow@mail.lon-capa.org
Sat, 14 Jul 2007 00:50:25 -0000


albertel		Fri Jul 13 20:50:25 2007 EDT

  Modified files:              
    /loncom/interface	londocs.pm 
  Log:
  - BUG#5310 - adding a resource to supplemental could get it 'stuck' and attempts to add things to docs would add to supplemental
  
  
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.292 loncom/interface/londocs.pm:1.293
--- loncom/interface/londocs.pm:1.292	Fri Jul 13 20:10:13 2007
+++ loncom/interface/londocs.pm	Fri Jul 13 20:50:24 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.292 2007/07/14 00:10:13 albertel Exp $
+# $Id: londocs.pm,v 1.293 2007/07/14 00:50:24 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1304,7 +1304,6 @@
     if ($env{'form.'.$which.'_'.$idx}) {
 	my $value = ($which eq 'randompick') ? $env{'form.'.$which.'_'.$idx}
 	                                     : 'yes';
-	&Apache::lonnet::logthis("val $value");
 	&LONCAPA::map::storeparameter($idx, 'parameter_'.$which, $value,
 				      $parameter_type{$which});
 	&remember_parms($idx,$which,'set',$value);
@@ -2733,7 +2732,8 @@
 		     &mt('Editing the Table of Contents for your '.$type)));
     }
 # --------------------------------------------------------- Standard documents
-    $r->print('<table class="LC_docs_documents">');#border=2 cellspacing=4 cellpadding=4>');
+    $r->print('<table class="LC_docs_documents">');
+
     if (($standard) && ($allowed) && (!$forcesupplement)) {
 	$r->print('<tr><td class="LC_docs_document">');
 #  '<h2>'.&mt('Main Course Documents').
@@ -2742,6 +2742,8 @@
        if ($folder eq '' || $folder eq 'supplemental') {
            $folder='default';
 	   $env{'form.folderpath'}='default&'.&escape(&mt('Main '.$type.' Documents'));
+           $uploadtag = '<input type="hidden" name="folderpath" value="'.
+	       &HTML::Entities::encode($env{'form.folderpath'},'<>&"').'" />';
        }
        my $postexec='';
        if ($folder eq 'default') {