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

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 06 Apr 2004 23:05:30 -0000


albertel		Tue Apr  6 19:05:30 2004 EDT

  Modified files:              
    /loncom/interface	londocs.pm 
  Log:
  - stop poping up new windows in DOCS (BUG#1331)
      - needs to preserve path info, currently when you 'Re init' it does take you back to the top sequence
  - put versions numbers into URLs in DOCS
  
  
  
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.112 loncom/interface/londocs.pm:1.113
--- loncom/interface/londocs.pm:1.112	Mon Apr  5 16:14:06 2004
+++ loncom/interface/londocs.pm	Tue Apr  6 19:05:29 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.112 2004/04/05 20:14:06 raeburn Exp $
+# $Id: londocs.pm,v 1.113 2004/04/06 23:05:29 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -466,21 +466,23 @@
        } 
     }
     $url=~s/^http\&colon\;\/\//\/adm\/wrapper\/ext\//;
-    if (($residx) && ($folder!~/supplemental/)) {
-       $url.=(($url=~/\?/)?'&':'?').'symb='.
-       &Apache::lonnet::escape(&Apache::lonnet::symbclean(
+    if ((!$isfolder) && ($residx) && ($folder!~/supplemental/)) {
+	my $symb=&Apache::lonnet::symbclean(
           &Apache::lonnet::declutter('uploaded/'.
            $ENV{'course.'.$ENV{'request.course.id'}.'.domain'}.'/'.
            $ENV{'course.'.$ENV{'request.course.id'}.'.num'}.'/'.$folder.
            '.sequence').
            '___'.$residx.'___'.
-	   &Apache::lonnet::declutter($url)));
+	   &Apache::lonnet::declutter($url));
+	(undef,undef,$url)=&Apache::lonnet::decode_symb($symb);
+	$url=&Apache::lonnet::clutter($url);
+	$url.=(($url=~/\?/)?'&':'?').'symb='.&Apache::lonnet::escape($symb);
     }
     if ($isfolder) { $url.='&foldername='.
        &Apache::lonnet::escape($foldertitle); }
-    $line.='<td bgcolor="#FFFFBB"><a href="'.$url.'" target="cat_'.$folder.
-	'"><img src="'.$icon.'" border="0"></a></td>'.
-        "<td bgcolor='#FFFFBB'><a href='$url' target='cat_$folder'>$title</a></td></tr>";
+    $line.='<td bgcolor="#FFFFBB"><a href="'.$url.'"><img src="'.$icon.
+	'" border="0"></a></td>'.
+        "<td bgcolor='#FFFFBB'><a href='$url'>$title</a></td></tr>";
     return $line;
 }