--- loncom/interface/domainprefs.pm 2018/12/05 21:13:23 1.343
+++ loncom/interface/domainprefs.pm 2019/02/15 20:56:14 1.349
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set domain-wide configuration settings
#
-# $Id: domainprefs.pm,v 1.343 2018/12/05 21:13:23 raeburn Exp $
+# $Id: domainprefs.pm,v 1.349 2019/02/15 20:56:14 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -394,11 +394,12 @@ sub handler {
modify => \&modify_usermodification,
},
'scantron' =>
- { text => 'Bubblesheet format file',
+ { text => 'Bubblesheet format',
help => 'Domain_Configuration_Scantron_Format',
- header => [ {col1 => 'Item',
- col2 => '',
- }],
+ header => [ {col1 => 'Bubblesheet format file',
+ col2 => ''},
+ {col1 => 'Bubblesheet data upload formats',
+ col2 => 'Settings'}],
print => \&print_scantron,
modify => \&modify_scantron,
},
@@ -627,6 +628,9 @@ END
if (grep(/^contacts$/,@actions)) {
$js .= &contacts_javascript();
}
+ if (grep(/^scantron$/,@actions)) {
+ $js .= &scantron_javascript();
+ }
&Apache::lonconfigsettings::display_settings($r,$dom,$phase,$context,\@prefs_order,\%prefs,\%domconfig,$confname,$js);
} else {
# check if domconfig user exists for the domain.
@@ -828,6 +832,8 @@ sub print_config_box {
$output .= $item->{'print'}->('top',$dom,$settings,\$rowtotal);
} elsif ($action eq 'coursecategories') {
$output .= $item->{'print'}->('top',$dom,$item,$settings,\$rowtotal);
+ } elsif ($action eq 'scantron') {
+ $output .= $item->{'print'}->($r,'top',$dom,$confname,$settings,\$rowtotal);
} elsif ($action eq 'login') {
if ($numheaders == 4) {
$colspan = ' colspan="2"';
@@ -932,6 +938,8 @@ sub print_config_box {
($action eq 'defaults') || ($action eq 'directorysrch') ||
($action eq 'helpsettings')) {
$output .= $item->{'print'}->('bottom',$dom,$settings,\$rowtotal);
+ } elsif ($action eq 'scantron') {
+ $output .= $item->{'print'}->($r,'bottom',$dom,$confname,$settings,\$rowtotal);
} elsif ($action eq 'ssl') {
$output .= $item->{'print'}->('connto',$dom,$settings,\$rowtotal).'
@@ -1113,8 +1121,6 @@ sub print_config_box {
($action eq 'serverstatuses') || ($action eq 'loadbalancing') ||
($action eq 'ltitools') || ($action eq 'lti')) {
$output .= $item->{'print'}->($dom,$settings,\$rowtotal);
- } elsif ($action eq 'scantron') {
- $output .= &print_scantronformat($r,$dom,$confname,$settings,\$rowtotal);
}
}
$output .= '
@@ -2836,7 +2842,31 @@ sub lti_toggle_js {
// {$item}) eq 'HASH') {
$key = $settings->{$item}->{'key'};
$secret = $settings->{$item}->{'secret'};
$lifetime = $settings->{$item}->{'lifetime'};
$consumer = $settings->{$item}->{'consumer'};
+ $requser = $settings->{$item}->{'requser'};
$current = $settings->{$item};
}
+ my $onclickrequser = ' onclick="toggleLTI(this.form,'."'requser','$i'".');"';
+ my %checkedrequser = (
+ yes => ' checked="checked"',
+ no => '',
+ );
+ if (!$requser) {
+ $checkedrequser{'no'} = $checkedrequser{'yes'};
+ $checkedrequser{'yes'} = '';
+ }
my $chgstr = ' onchange="javascript:reorderLTI(this.form,'."'lti_pos_".$item."'".');"';
$datatable .= '
'
.' |