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

raeburn raeburn at source.lon-capa.org
Mon Dec 3 17:59:04 EST 2012


raeburn		Mon Dec  3 22:59:04 2012 EDT

  Modified files:              
    /loncom/auth	lonroles.pm 
  Log:
  - Support case where destinationurl's query string contains symb as other than
    first item. 
  
  
Index: loncom/auth/lonroles.pm
diff -u loncom/auth/lonroles.pm:1.276 loncom/auth/lonroles.pm:1.277
--- loncom/auth/lonroles.pm:1.276	Tue Sep  4 20:47:46 2012
+++ loncom/auth/lonroles.pm	Mon Dec  3 22:59:03 2012
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # User Roles Screen
 #
-# $Id: lonroles.pm,v 1.276 2012/09/04 20:47:46 raeburn Exp $
+# $Id: lonroles.pm,v 1.277 2012/12/03 22:59:03 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -595,13 +595,13 @@
                                                 if ($env{'request.role.adv'}) {
                                                     $dest = &Apache::lonenc::unencrypted($dest);
                                                     if ($destsymb eq '') {
-                                                        ($destsymb) = ($dest =~ /\?symb=([^\&]*)/);
+                                                        ($destsymb) = ($dest =~ /(?:\?|\&)symb=([^\&]*)/);
                                                         $destsymb = &unescape($destsymb);
                                                     }
                                                 }
                                             } else {
                                                 if ($destsymb eq '') {
-                                                    ($destsymb) = ($dest =~ /\?symb=([^\&]+)/);
+                                                    ($destsymb) = ($dest =~ /(:\?|\&)symb=([^\&]+)/);
                                                     $destsymb = &unescape($destsymb);
                                                 }
                                                 unless ($env{'request.role.adv'}) {
@@ -620,7 +620,7 @@
                                                 }
                                             }
                                         }
-                                        unless (($dest =~ m{^/enc/}) || ($dest =~ /\?symb=.+___\d+___.+/)) {
+                                        unless (($dest =~ m{^/enc/}) || ($dest =~ /(\?|\&)symb=.+___\d+___.+/)) {
                                             if (($destsymb ne '') && ($destsymb !~ m{^/enc/})) {
                                                 my $esc_symb = &escape($destsymb);
                                                 $dest .= '?symb='.$esc_symb;




More information about the LON-CAPA-cvs mailing list