--- loncom/interface/domainprefs.pm 2014/05/30 01:39:48 1.246
+++ loncom/interface/domainprefs.pm 2014/08/06 17:16:29 1.251
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set domain-wide configuration settings
#
-# $Id: domainprefs.pm,v 1.246 2014/05/30 01:39:48 raeburn Exp $
+# $Id: domainprefs.pm,v 1.251 2014/08/06 17:16:29 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -762,8 +762,9 @@ sub print_config_box {
$output .= &print_login('help',$dom,$confname,$phase,$settings,\$rowtotal);
}
} elsif ($action eq 'requestcourses') {
- $output .= &print_requestmail($dom,$action,$settings,\$rowtotal).
- &print_studentcode($settings,\$rowtotal).'
+ $output .= &print_requestmail($dom,$action,$settings,\$rowtotal);
+ $rowtotal ++;
+ $output .= &print_studentcode($settings,\$rowtotal).'
@@ -798,6 +799,7 @@ sub print_config_box {
&print_validation_rows('requestcourses',$dom,$settings,\$rowtotal);
} elsif ($action eq 'requestauthor') {
$output .= &print_requestmail($dom,$action,$settings,\$rowtotal);
+ $rowtotal ++;
} elsif ($action eq 'rolecolors') {
$output .= &print_rolecolors($phase,'coordinator',$dom,$confname,$settings,\$rowtotal).'
@@ -2074,7 +2076,6 @@ sub print_requestmail {
$datatable .= &mt('There are no active Domain Coordinators');
}
$datatable .='';
- $$rowtotal += $rows;
return $datatable;
}
@@ -2083,9 +2084,11 @@ sub print_studentcode {
my $rownum = 0;
my ($output,%current);
my @crstypes = ('official','unofficial','community','textbook');
- if (ref($settings->{'uniquecode'}) eq 'HASH') {
- foreach my $type (@crstypes) {
- $current{$type} = $settings->{'uniquecode'}{$type};
+ if (ref($settings) eq 'HASH') {
+ if (ref($settings->{'uniquecode'}) eq 'HASH') {
+ foreach my $type (@crstypes) {
+ $current{$type} = $settings->{'uniquecode'}{$type};
+ }
}
}
$output .= '
'.
@@ -2519,13 +2522,15 @@ sub print_autocreate {
$createoff{'req'}.' value="0" />'.&mt('No').'';
my ($numdc,$dctable,$rows) = &active_dc_picker($dom,$numinrow,'radio',
'autocreate_xmldc',%currhash);
+ $datatable .= '
';
if ($numdc > 1) {
- $datatable .= ' |
'.
- &mt('Course creation processed as: (choose Dom. Coord.)').
- ' | '.$dctable.' |
';
+ $datatable .= &mt('Course creation processed as: (choose Dom. Coord.)').
+ '';
} else {
- $datatable .= $dctable.' | ';
+ $datatable .= &mt('Course creation processed as:').
+ '';
}
+ $datatable .= $dctable.' | ';
$$rowtotal += $rows;
return $datatable;
}
@@ -3117,21 +3122,24 @@ sub print_validation_rows {
}
if ($caller eq 'requestcourses') {
my %currhash;
- if (ref($settings->{'validation'}) eq 'HASH') {
- if ($settings->{'validation'}{'dc'} ne '') {
- $currhash{$settings->{'validation'}{'dc'}} = 1;
+ if (ref($settings) eq 'HASH') {
+ if (ref($settings->{'validation'}) eq 'HASH') {
+ if ($settings->{'validation'}{'dc'} ne '') {
+ $currhash{$settings->{'validation'}{'dc'}} = 1;
+ }
}
}
my $numinrow = 2;
my ($numdc,$dctable,$rows) = &active_dc_picker($dom,$numinrow,'radio',
'validationdc',%currhash);
+ my $css_class = $itemcount%2 ? ' class="LC_odd_row"' : '';
+ $datatable .= '';
if ($numdc > 1) {
- $datatable .= ' |
'.
- &mt('Course creation processed as: (choose Dom. Coord.)').
- ' | '.$dctable.' |
';
+ $datatable .= &mt('Course creation processed as: (choose Dom. Coord.)');
} else {
- $datatable .= $dctable.'';
+ $datatable .= &mt('Course creation processed as: ');
}
+ $datatable .= ''.$dctable.' | ';
$itemcount ++;
}
if (ref($rowtotal)) {
@@ -4157,8 +4165,10 @@ sub print_selfcreation {
$datatable .= '';
}
my $currval;
- if (ref($createsettings->{'shibenv'}) eq 'HASH') {
- $currval = $createsettings->{'shibenv'}{$fields[$i]};
+ if (ref($createsettings) eq 'HASH') {
+ if (ref($createsettings->{'shibenv'}) eq 'HASH') {
+ $currval = $createsettings->{'shibenv'}{$fields[$i]};
+ }
}
$datatable .= ''.
''.
@@ -5162,14 +5172,14 @@ sub serverstatus_pages {
sub defaults_javascript {
my ($settings) = @_;
- my ($output,$jstext);
+ return unless (ref($settings) eq 'HASH');
if ((ref($settings->{'inststatusorder'}) eq 'ARRAY') && (ref($settings->{'inststatustypes'}) eq 'HASH')) {
my $maxnum = scalar(@{$settings->{'inststatusorder'}});
if ($maxnum eq '') {
$maxnum = 0;
}
$maxnum ++;
- $jstext = ' var inststatuses = Array('."'".join("','",@{$settings->{'inststatusorder'}})."'".');';
+ my $jstext = ' var inststatuses = Array('."'".join("','",@{$settings->{'inststatusorder'}})."'".');';
return <<"ENDSCRIPT";
|