--- loncom/interface/domainprefs.pm 2022/11/17 21:43:38 1.418
+++ loncom/interface/domainprefs.pm 2023/02/14 21:44:15 1.419
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set domain-wide configuration settings
#
-# $Id: domainprefs.pm,v 1.418 2022/11/17 21:43:38 raeburn Exp $
+# $Id: domainprefs.pm,v 1.419 2023/02/14 21:44:15 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -167,6 +167,7 @@ use Apache::lonmsg();
use Apache::lonconfigsettings;
use Apache::lonuserutils();
use Apache::loncoursequeueadmin();
+use Apache::courseprefs();
use LONCAPA qw(:DEFAULT :match);
use LONCAPA::Enrollment;
use LONCAPA::lonauthcgi();
@@ -3431,8 +3432,17 @@ ENDSCRIPT
sub lti_javascript {
my ($dom,$settings) = @_;
my $togglejs = <i_toggle_js($dom);
+ my $linkprot_js = &Apache::courseprefs::linkprot_javascript();
unless (ref($settings) eq 'HASH') {
- return $togglejs;
+ return $togglejs.'
+
+';
}
my (%ordered,$total,%jstext);
$total = scalar(keys(%{$settings}));
@@ -3450,7 +3460,6 @@ sub lti_javascript {
push(@jsarray,$ordered{$item});
}
my $jstext = ' var lti = Array('."'".join("','",@jsarray)."'".');'."\n";
- my $linkprot_js = &Apache::courseprefs::linkprot_javascript();
return <<"ENDSCRIPT";