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

raeburn lon-capa-cvs@mail.lon-capa.org
Fri, 03 Dec 2004 06:51:51 -0000


raeburn		Fri Dec  3 01:51:51 2004 EDT

  Modified files:              
    /loncom/interface	lonmenu.pm 
  Log:
  Provide a return url when RC is launched in remoteless display of a resource in CSTR.
  
  
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.133 loncom/interface/lonmenu.pm:1.134
--- loncom/interface/lonmenu.pm:1.133	Thu Dec  2 18:03:32 2004
+++ loncom/interface/lonmenu.pm	Fri Dec  3 01:51:50 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.133 2004/12/02 23:03:32 albertel Exp $
+# $Id: lonmenu.pm,v 1.134 2004/12/03 06:51:50 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -78,6 +78,13 @@
     my $reloadlink='';
     my $escurl=&Apache::lonnet::escape(&Apache::lonenc::check_encrypt($ENV{'request.noversionuri'}));
     my $escsymb=&Apache::lonnet::escape(&Apache::lonenc::check_encrypt($ENV{'request.symb'}));
+    if ($ENV{'request.state'} eq 'construct') {
+        if (($ENV{'request.noversionuri'} eq '') || (!defined($ENV{'request.noversionuri'}))) {
+            my $returnurl = $ENV{'request.filename'};
+            $returnurl =~ s:^/home/([^/]+)/public_html/(.*)$:/priv/$1/$2:;
+            $escurl = &Apache::lonnet::escape($returnurl);
+        }
+    }
     if ($ENV{'browser.interface'} eq 'textual') {
 # Textual display only
 	my %lt=&initlittle();