--- loncom/auth/switchserver.pm 2017/11/30 15:14:51 1.38 +++ loncom/auth/switchserver.pm 2018/04/14 02:30:11 1.40 @@ -1,7 +1,7 @@ # The LearningOnline Network # Switch Servers Handler # -# $Id: switchserver.pm,v 1.38 2017/11/30 15:14:51 raeburn Exp $ +# $Id: switchserver.pm,v 1.40 2018/04/14 02:30:11 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -180,6 +180,10 @@ sub handler { my $logmsg = "Switch Server to $env{'form.otherserver'}"; if ($env{'form.role'}) { $logmsg .= " with role: $env{'form.role'}"; + } elsif (($env{'form.lti.reqcrs'}) && ($env{'form.lti.reqrole'} eq 'cc')) { + $logmsg .= " to create new LTI course"; + } elsif ($env{'form.lti.selfenrollrole'}) { + $logmsg .= " to selfenroll with role: $env{'form.lti.selfenrollrole'}"; } else { $logmsg .= " (no role)"; } @@ -231,6 +235,21 @@ sub handler { if ($env{'request.lti.login'}) { $info{'lti.login'} = $env{'request.lti.login'}; } + if ($env{'request.lti.uri'}) { + $info{'lti.uri'} = $env{'request.lti.uri'}; + } + if ($env{'request.lti.reqcrs'}) { + $info{'lti.reqcrs'} = $env{'request.lti.reqcrs'}; + } + if ($env{'request.lti.reqrole'}) { + $info{'lti.reqrole'} = $env{'request.lti.reqrole'}; + } + if ($env{'request.lti.selfenrollrole'}) { + $info{'lti.selfenrollrole'} = $env{'request.lti.selfenrollrole'}; + } + if ($env{'request.lti.sourcecrs'}) { + $info{'lti.sourcecrs'} = $env{'request.lti.sourcecrs'}; + } if ($env{'request.lti.passbackid'}) { $info{'lti.passbackid'} = $env{'request.lti.passbackid'}; } @@ -243,6 +262,9 @@ sub handler { if ($env{'request.lti.rosterurl'}) { $info{'lti.rosterurl'} = $env{'request.lti.rosterurl'}; } + if ($env{'request.lti.target'}) { + $info{'lti.target'} = $env{'request.lti.target'}; + } my $token = &Apache::lonnet::tmpput(\%info,$env{'form.otherserver'}); my $url =$protocol.'://'.$switch_to.'/adm/login?'. 'domain='.$env{'user.domain'}.