--- loncom/interface/courseprefs.pm 2022/02/20 22:18:23 1.49.2.28.2.5 +++ loncom/interface/courseprefs.pm 2022/02/21 16:11:18 1.49.2.28.2.6 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set configuration settings for a course # -# $Id: courseprefs.pm,v 1.49.2.28.2.5 2022/02/20 22:18:23 raeburn Exp $ +# $Id: courseprefs.pm,v 1.49.2.28.2.6 2022/02/21 16:11:18 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -5245,9 +5245,6 @@ sub menucollections_display { sub print_linkprotection { my ($cdom,$cnum,$settings,$rowtotal,$crstype,$noedit,$context) = @_; - unless (ref($settings) eq 'HASH') { - return; - } my %linkprotection; my $count = 0; @@ -5292,7 +5289,7 @@ sub print_linkprotection { } } - if (ref($settings->{'linkprot'}) eq 'HASH') { + if ((ref($settings) eq 'HASH') && (ref($settings->{'linkprot'}) eq 'HASH')) { if (keys(%{$settings->{'linkprot'}})) { my @current = sort { $a <=> $b } keys(%{$settings->{'linkprot'}}); $next += $current[-1]; @@ -5415,7 +5412,7 @@ sub print_linkprotection { $datatable .= ''."\n". ''."\n". ''.&mt('Add').''."\n". - ''; + ''; my ($usersty,$onclickrequser,%checkedrequser); if ($ltiauth) { $usersty = 'display:none';