--- loncom/interface/londocs.pm 2025/01/07 01:25:57 1.719 +++ loncom/interface/londocs.pm 2025/01/07 03:51:55 1.720 @@ -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 @@ sub generate_admin_menu { if (grep(/^\Q$crshome\E$/,@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,