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

raeburn raeburn at source.lon-capa.org
Wed Feb 16 11:35:23 EST 2022


raeburn		Wed Feb 16 16:35:23 2022 EDT

  Modified files:              
    /loncom/interface	lonrequestcourse.pm 
  Log:
  - Bug 6754
    - When storing mapping of Consumer system's courseID  to LON-CAPA's course
    "number" include LTI item id verified from signed payload.
  
  
Index: loncom/interface/lonrequestcourse.pm
diff -u loncom/interface/lonrequestcourse.pm:1.113 loncom/interface/lonrequestcourse.pm:1.114
--- loncom/interface/lonrequestcourse.pm:1.113	Wed Nov 24 04:25:02 2021
+++ loncom/interface/lonrequestcourse.pm	Wed Feb 16 16:35:23 2022
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Request a course
 #
-# $Id: lonrequestcourse.pm,v 1.113 2021/11/24 04:25:02 raeburn Exp $
+# $Id: lonrequestcourse.pm,v 1.114 2022/02/16 16:35:23 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -5232,11 +5232,11 @@
             if (ref($lti{$env{'request.lti.login'}}) eq 'HASH') {
                 $storecrs = $lti{$env{'request.lti.login'}}{'storecrs'};
             }
-        }
-        if ($storecrs) {
-            my %consumers = &Apache::lonnet::get_dom('lticonsumers',[$env{'form.sourcecrs'}],$dom);
-            if (($env{'form.lti.sourcecrs'} ne '')  && ($consumers{$env{'form.lti.sourcecrs'}} eq '') && ($cnum ne '')) {
-                &Apache::lonnet::put_dom('lticonsumers',{ $env{'form.lti.sourcecrs'} => $cnum },$dom);
+            if ($storecrs) {
+                my %consumers = &Apache::lonnet::get_dom('lticonsumers',[$env{'form.sourcecrs'}],$dom);
+                if (($env{'form.lti.sourcecrs'} ne '')  && ($consumers{$env{'form.lti.sourcecrs'}} eq '') && ($cnum ne '')) {
+                    &Apache::lonnet::put_dom('lticonsumers',{ $env{'form.lti.sourcecrs'} => $env{'request.lti.login'}.':'.$cnum },$dom);
+                }
             }
         }
     } elsif (&Apache::loncoursequeueadmin::author_prompt()) {




More information about the LON-CAPA-cvs mailing list