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

www lon-capa-cvs@mail.lon-capa.org
Thu, 20 Jul 2006 18:37:16 -0000


www		Thu Jul 20 14:37:16 2006 EDT

  Modified files:              
    /loncom/interface	londocs.pm 
  Log:
  Don't produce bad links that end up in "Invalid Request"
  
  
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.240 loncom/interface/londocs.pm:1.241
--- loncom/interface/londocs.pm:1.240	Thu Jul 20 11:25:09 2006
+++ loncom/interface/londocs.pm	Thu Jul 20 14:37:14 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.240 2006/07/20 15:25:09 www Exp $
+# $Id: londocs.pm,v 1.241 2006/07/20 18:37:14 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1591,7 +1591,11 @@
 	} elsif ($url=~m|^/ext/|) { 
 	    $url='/adm/wrapper'.$url;
 	}
-	$url.=(($url=~/\?/)?'&':'?').'symb='.&escape($symb);
+        if (&Apache::lonnet::symbverify($symb,$url)) {
+	    $url.=(($url=~/\?/)?'&':'?').'symb='.&escape($symb);
+        } else {
+            $url='';
+        }
 	if ($container eq 'page') {
 	    my $symb=$env{'form.pagesymb'};
 	    	    
@@ -1634,7 +1638,8 @@
     }
     $line.='<td bgcolor="#FFFFBB"><a href="'.$url.'"><img src="'.$icon.
 	'" border="0"></a></td>'.
-        "<td bgcolor='#FFFFBB'><a href=\"$url\">$title</a></td>";
+        "<td bgcolor='#FFFFBB'>".($url?"<a href=\"$url\">":'').$title.
+        ($url?'</a>':' <font size="-2">'.&mt('(re-initialize course to access)').'</font>')."</td>";
     if (($allowed) && ($folder!~/^supplemental/)) {
  	my %lt=&Apache::lonlocal::texthash(
  			      'hd' => 'Hidden',