[LON-CAPA-cvs] cvs: loncom /auth lonroles.pm

raeburn lon-capa-cvs-allow@mail.lon-capa.org
Wed, 30 Jul 2008 15:34:36 -0000


raeburn		Wed Jul 30 11:34:36 2008 EDT

  Modified files:              
    /loncom/auth	lonroles.pm 
  Log:
  - For bug 3987.  lonroles.pm will accept a destsymb form item, encode it and append it to the destinationurl.
  - Intended to support linking to a specific resource in a course from outside LON-CAPA.
  - Login page and SSO need to preserve an appropriate query string for the call to /adm/roles after authentication and session initialization.   
  
  
Index: loncom/auth/lonroles.pm
diff -u loncom/auth/lonroles.pm:1.202 loncom/auth/lonroles.pm:1.203
--- loncom/auth/lonroles.pm:1.202	Fri Jul 18 12:17:39 2008
+++ loncom/auth/lonroles.pm	Wed Jul 30 11:34:34 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # User Roles Screen
 #
-# $Id: lonroles.pm,v 1.202 2008/07/18 16:17:39 raeburn Exp $
+# $Id: lonroles.pm,v 1.203 2008/07/30 15:34:34 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -336,6 +336,10 @@
 				} elsif ($env{'request.course.id'}) {
                                     if ($env{'form.destinationurl'}) {
                                         my $dest = $env{'form.destinationurl'};
+                                        if ($env{'form.destsymb'} ne '') {
+                                            my $esc_symb = &HTML::Entities::encode($env{'form.destsymb'},'"<>&');
+                                            $dest .= '?symb='.$esc_symb;
+                                        }
                                         &redirect_user($r,&mt('Entering [_1]',
                                                       $env{'course.'.$courseid.'.description'}),
                                                $dest,$msg,