[LON-CAPA-cvs] cvs: loncom /lti ltiauth.pm

raeburn raeburn at source.lon-capa.org
Tue Aug 14 17:03:40 EDT 2018


raeburn		Tue Aug 14 21:03:40 2018 EDT

  Modified files:              
    /loncom/lti	ltiauth.pm 
  Log:
  - Bug 6754 LON-CAPA as LTI Provider
    - Convert tail of launch URL to a real symb, if launch was for a single
      resource.  
  
  
Index: loncom/lti/ltiauth.pm
diff -u loncom/lti/ltiauth.pm:1.15 loncom/lti/ltiauth.pm:1.16
--- loncom/lti/ltiauth.pm:1.15	Sat Jun 30 23:58:14 2018
+++ loncom/lti/ltiauth.pm	Tue Aug 14 21:03:39 2018
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Basic LTI Authentication Module
 #
-# $Id: ltiauth.pm,v 1.15 2018/06/30 23:58:14 raeburn Exp $
+# $Id: ltiauth.pm,v 1.16 2018/08/14 21:03:39 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -205,14 +205,14 @@
                 $mapurl = $tail;
             } else {
                 $symb = $tail;
-                $symb =~ s{^/+}{};
+                $symb =~ s{^/}{};
             }
         } elsif ($tail =~ m{^/res/(?:$match_domain)/(?:$match_username)/.+\.(?:sequence|page)(|___\d+___.+)$}) {
             if ($1 eq '') {
                 $mapurl = $tail;
             } else {
                 $symb = $tail;
-                $symb =~ s{^/+}{};
+                $symb =~ s{^/res/}{};
             }
         } elsif ($tail =~ m{^/($match_domain)/($match_courseid)$}) {
             ($urlcdom,$urlcnum) = ($1,$2);
@@ -730,7 +730,7 @@
         &Apache::lonauth::success($r,$uname,$udom,$uhome,'noredirect');
         if ($symb) {
             $env{'form.symb'} = $symb;
-            $env{'request.lti.uri'} = $symb;
+            $env{'request.lti.uri'} = $tail;
         } else {
             if ($mapurl) {
                 $env{'form.origurl'} = $mapurl;




More information about the LON-CAPA-cvs mailing list