version 1.21.4.11.2.1, 2020/10/25 19:10:26
|
version 1.21.4.12, 2021/12/13 20:09:54
|
Line 39 use Apache::courseclassifier();
|
Line 39 use Apache::courseclassifier();
|
use LONCAPA qw(:DEFAULT :match); |
use LONCAPA qw(:DEFAULT :match); |
|
|
sub print_header { |
sub print_header { |
my ($r,$phase,$context,$jscript,$container,$instcode,$dom,$values) = @_; |
my ($r,$phase,$context,$jscript,$container,$instcode,$dom) = @_; |
my ($pagetitle,$brcrumtitle,$action,$call_category_check,$instcode_check, |
my ($pagetitle,$brcrumtitle,$action,$call_category_check,$instcode_check, |
$crstype,@actions,@code_order); |
$crstype,@actions,@code_order); |
if ($phase eq 'display') { |
if ($phase eq 'display') { |
Line 214 $jscript
|
Line 214 $jscript
|
my $optionsprefix = 'LC_options_helpdesk_'; |
my $optionsprefix = 'LC_options_helpdesk_'; |
$onload .= "toggleHelpdeskRow(document.display,'overrides','$customclass','$optionsprefix');"; |
$onload .= "toggleHelpdeskRow(document.display,'overrides','$customclass','$optionsprefix');"; |
} |
} |
if (grep(/^ltitools$/,@actions)) { |
if (grep(/^wafproxy$/,@actions)) { |
$onload .= "toggleLTITools(document.display,'user','add');"; |
$onload .= "toggleWAF();checkWAF();updateWAF();"; |
if (ref($values) eq 'HASH') { |
|
if (ref($values->{'ltitools'}) eq 'HASH') { |
|
my $numltitools = scalar(keys(%{$values->{'ltitools'}})); |
|
for (my $i=0; $i<$numltitools; $i++) { |
|
$onload .= "toggleLTITools(document.display,'user','$i');"; |
|
} |
|
} |
|
} |
|
} |
} |
if (grep(/^scantron$/,@actions)) { |
if (grep(/^scantron$/,@actions)) { |
$onload .= "toggleScantron('document.display');"; |
$onload .= "toggleScantron('document.display');"; |
} |
} |
|
if (grep(/^autoupdate$/,@actions)) { |
|
$onload .= "toggleLastActiveDays('document.display');"; |
|
} |
|
if (grep(/^login$/,@actions)) { |
|
my %domservers = &Apache::lonnet::get_servers($dom); |
|
foreach my $server (sort(keys(%domservers))) { |
|
$onload .= "toggleSamlOptions(document.display,'$server');"; |
|
} |
|
} |
if ($onload) { |
if ($onload) { |
my %loaditems = ( |
my %loaditems = ( |
'onload' => $onload, |
'onload' => $onload, |
Line 314 sub make_changes {
|
Line 315 sub make_changes {
|
{href=>"javascript:changePage(document.$phase,'$phase')", |
{href=>"javascript:changePage(document.$phase,'$phase')", |
text=>"Updated"}); |
text=>"Updated"}); |
&print_header($r,$phase,$context,undef,$container); |
&print_header($r,$phase,$context,undef,$container); |
my ($crstype,%lastact); |
my ($crstype,%lastact,$errors); |
if ($context eq 'course') { |
if ($context eq 'course') { |
$crstype = &Apache::loncommon::course_type(); |
$crstype = &Apache::loncommon::course_type(); |
} |
} |
Line 328 sub make_changes {
|
Line 329 sub make_changes {
|
$confname,$item,$roles,$values,\%lastact)); |
$confname,$item,$roles,$values,\%lastact)); |
} else { |
} else { |
$changes{$item} = {}; |
$changes{$item} = {}; |
&Apache::courseprefs::process_changes($dom,$item,$values, |
$errors = |
$prefs->{$item},$changes{$item}, |
&Apache::courseprefs::process_changes($dom,$item,$values, |
$allitems,\%disallowed,$crstype); |
$prefs->{$item},$changes{$item}, |
|
$allitems,\%disallowed,$crstype); |
if (keys(%{$changes{$item}}) > 0) { |
if (keys(%{$changes{$item}}) > 0) { |
$numchanged ++; |
$numchanged ++; |
} |
} |
Line 362 sub make_changes {
|
Line 364 sub make_changes {
|
} |
} |
$r->print('</p>'); |
$r->print('</p>'); |
} |
} |
|
if ($errors) { |
|
$r->print('<p>'.$errors.'</p>'); |
|
} |
} |
} |
$r->print('<p>'); |
$r->print('<p>'); |
my $footer_text = 'Back to configuration display'; |
my $footer_text = 'Back to configuration display'; |
Line 385 sub display_settings {
|
Line 390 sub display_settings {
|
if (ref($values) eq 'HASH') { |
if (ref($values) eq 'HASH') { |
$instcode = $values->{'internal.coursecode'}; |
$instcode = $values->{'internal.coursecode'}; |
} |
} |
&print_header($r,$phase,$context,$jscript,$container,$instcode,$dom,$values); |
&print_header($r,$phase,$context,$jscript,$container,$instcode,$dom); |
my $divwidth = 900; |
my $divwidth = 900; |
if ((ref($prefs_order) eq 'ARRAY') && (ref($prefs) eq 'HASH') && (ref($values) eq 'HASH')) { |
if ((ref($prefs_order) eq 'ARRAY') && (ref($prefs) eq 'HASH') && (ref($values) eq 'HASH')) { |
if (@actions > 0) { |
if (@actions > 0) { |
Line 512 sub display_choices {
|
Line 517 sub display_choices {
|
$thirddiv = 1; |
$thirddiv = 1; |
} |
} |
} |
} |
$r->print('</div><br clear="all" />'); |
|
} |
} |
|
$r->print('</div><div style="padding:0;clear:both;margin:0;border:0"></div>'); |
$r->print(&print_footer($r,$phase,'display','Display',undef,$container,$parm_permission)); |
$r->print(&print_footer($r,$phase,'display','Display',undef,$container,$parm_permission)); |
$r->print('</form>'); |
$r->print('</form>'); |
$r->print(&Apache::loncommon::end_page()); |
$r->print(&Apache::loncommon::end_page()); |