--- loncom/auth/lonroles.pm 2022/02/24 13:08:59 1.360
+++ loncom/auth/lonroles.pm 2022/05/24 16:23:04 1.363
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# User Roles Screen
#
-# $Id: lonroles.pm,v 1.360 2022/02/24 13:08:59 raeburn Exp $
+# $Id: lonroles.pm,v 1.363 2022/05/24 16:23:04 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -181,7 +181,8 @@ ENDREDIR
sub finish_loading_course {
my ($r,$msg,$url) = @_;
- my $link = '
';
+ my $link = '';
my $end_page = &Apache::loncommon::end_page();
my $js_url = &js_escape($url);
$r->print(<'.&mt('Entering [_1] ...',
$env{'course.'.$cdom.'_'.$cnum.'.description'}).
'';
@@ -929,6 +933,9 @@ ENDCLOSE
($env{'request.lti.rosterid'} || $env{'request.lti.passbackid'})) {
&process_lti($r,$cdom,$cnum);
}
+ if ($env{'request.deeplink.login'}) {
+ &set_deeplink_target($cnum,$cdom);
+ }
# Check to see if the user is a CC entering a course
# for the first time
if ((($role eq 'cc') || ($role eq 'co'))
@@ -1992,7 +1999,7 @@ sub findcourse_advice {
} else {
$r->print(''.&mt('If you were expecting to see an active role listed for a particular course, that course may not have been created yet.').'
');
if ($elapsed > 600) {
- $r->print(''.&mt('You may also have been assigned to a course in the time since you last logged-in, or checked for changes').
+ $r->print('
'.&mt('You may also have been assigned to a course in the time since you last logged-in, or checked for changes.').
'
'.
&mt('If that is the case you can use the "Check for changes" link in the gray Functions bar to update the list of your available course roles.').'
');
}
@@ -3547,6 +3554,32 @@ sub ltienroll {
}
}
+sub set_deeplink_target {
+ my ($cnum,$cdom) = @_;
+ if (($cnum ne '') && ($cdom ne '')) {
+ my $deeplink_symb = &Apache::loncommon::deeplink_login_symb($cnum,$cdom);
+ if ($deeplink_symb ne '') {
+ my $deeplink;
+ if ($deeplink_symb =~ /\.(page|sequence)$/) {
+ my $mapname = &Apache::lonnet::deversion((&Apache::lonnet::decode_symb($deeplink_symb))[2]);
+ my $navmap = Apache::lonnavmaps::navmap->new();
+ if (ref($navmap)) {
+ $deeplink = $navmap->get_mapparam(undef,$mapname,'0.deeplink');
+ }
+ } elsif ($deeplink_symb ne '') {
+ $deeplink = &Apache::lonnet::EXT('resource.0.deeplink',$deeplink_symb);
+ }
+ if ($deeplink ne '') {
+ my ($state,$others,$listed,$scope,$protect,$display,$target) = split(/,/,$deeplink);
+ if ($target ne '') {
+ &Apache::lonnet::appenv({'request.deeplink.target' => $target});
+ }
+ }
+ }
+ }
+ return;
+}
+
1;
__END__