[LON-CAPA-cvs] cvs: loncom /interface lontiny.pm
raeburn
raeburn at source.lon-capa.org
Wed May 9 23:49:52 EDT 2018
raeburn Thu May 10 03:49:52 2018 EDT
Modified files:
/loncom/interface lontiny.pm
Log:
- Bug 6754 LON-CAPA as LTI Provider
- For LTI session, no link to Roles/Courses page when tiny URL is invalid
Index: loncom/interface/lontiny.pm
diff -u loncom/interface/lontiny.pm:1.2 loncom/interface/lontiny.pm:1.3
--- loncom/interface/lontiny.pm:1.2 Sat Apr 14 02:29:44 2018
+++ loncom/interface/lontiny.pm Thu May 10 03:49:51 2018
@@ -2,7 +2,7 @@
# Extract domain, courseID, and symb from a shortened URL,
# and switch role to a role in designated course.
#
-# $Id: lontiny.pm,v 1.2 2018/04/14 02:29:44 raeburn Exp $
+# $Id: lontiny.pm,v 1.3 2018/05/10 03:49:51 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -276,13 +276,16 @@
sub generic_error {
my ($r) = @_;
- my $linktext;
- if ($env{'user.adv'}) {
- $linktext = &mt('Continue to your roles page');
- } else {
- $linktext = &mt('Continue to your courses page');
+ my $continuelink;
+ unless ($env{'request.lti.login'}) {
+ my $linktext;
+ if ($env{'user.adv'}) {
+ $linktext = &mt('Continue to your roles page');
+ } else {
+ $linktext = &mt('Continue to your courses page');
+ }
+ $continuelink='<a href="/adm/roles">'.$linktext.'</a>';
}
- my $continuelink='<a href="/adm/roles">'.$linktext.'</a>';
my $msg = &mt('The page you requested does not exist.');
&Apache::loncommon::content_type($r,'text/html');
$r->send_http_header;
More information about the LON-CAPA-cvs
mailing list