[LON-CAPA-cvs] cvs: loncom /interface londocs.pm
raeburn
raeburn at source.lon-capa.org
Mon Jan 6 22:51:56 EST 2025
raeburn Tue Jan 7 03:51:56 2025 EDT
Modified files:
/loncom/interface londocs.pm
Log:
- "Enter Course Authoring Space" link in Course Editor > Content Utilities
points at javascript:need_switchserver() when session is not hosted on
course's homeserver.
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.719 loncom/interface/londocs.pm:1.720
--- loncom/interface/londocs.pm:1.719 Tue Jan 7 01:25:57 2025
+++ loncom/interface/londocs.pm Tue Jan 7 03:51:55 2025
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.719 2025/01/07 01:25:57 raeburn Exp $
+# $Id: londocs.pm,v 1.720 2025/01/07 03:51:55 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -8659,10 +8659,12 @@
if (grep(/^\Q$crshome\E$/, at ids)) {
$linkurl = $crsauthorurl;
} else {
- $linkurl =
- &Apache::lonhtmlcommon::jump_to_editres($crsauthorurl,$crshome,1);
+ my $jscall = &Apache::lonhtmlcommon::jump_to_editres($crsauthorurl,$crshome,1);
+ if ($jscall) {
+ $linkurl = 'javascript:'.$jscall;
+ }
}
- if ((ref($menu[0]) eq 'HASH') && (ref($menu[0]->{'items'}) eq 'ARRAY')) {
+ if ((ref($menu[0]) eq 'HASH') && (ref($menu[0]->{'items'}) eq 'ARRAY') && ($linkurl)) {
push(@{$menu[0]->{items}},
{ linktext => $lt{'ca'},
url => $linkurl,
More information about the LON-CAPA-cvs
mailing list