--- loncom/interface/domainprefs.pm 2018/05/08 01:48:18 1.326
+++ loncom/interface/domainprefs.pm 2018/07/06 04:03:31 1.328
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set domain-wide configuration settings
#
-# $Id: domainprefs.pm,v 1.326 2018/05/08 01:48:18 raeburn Exp $
+# $Id: domainprefs.pm,v 1.328 2018/07/06 04:03:31 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -7962,7 +7962,7 @@ sub print_coursecategories {
''.$lt{$type}.' ';
}
- $datatable .= '';
+ $datatable .= '';
$itemcount ++;
}
$$rowtotal += $itemcount;
@@ -8048,7 +8048,7 @@ sub print_coursecategories {
$can_catcomm_dom.' value="dom" />'.$level{'dom'}.' '.
''.
- '
'.
+ '
'.
''.$title{'togglecatsplace'}.' | '.
' | '
+ $datatable .= '
'.$hdritem->{'header'}->[1]->{'col2'}.' |
'
.&initialize_categories($itemcount);
}
$$rowtotal += $itemcount;
@@ -8481,20 +8481,23 @@ sub initialize_categories {
communities => 'Communities',
placement => 'Placement Tests',
);
- my $select0 = ' selected="selected"';
- my $select1 = '';
+ my %selnum = (
+ instcode => '0',
+ communities => '1',
+ placement => '2',
+ );
+ my %selected;
foreach my $default ('instcode','communities','placement') {
$css_class = $itemcount%2?' class="LC_odd_row"':'';
- $chgstr = ' onchange="javascript:reorderCats(this.form,'."'',$default"."_pos','0'".');"';
- if (($default eq 'communities') || ($default eq 'placement')) {
- $select1 = $select0;
- $select0 = '';
- }
+ $chgstr = ' onchange="javascript:reorderCats(this.form,'."'','$default"."_pos','0'".');"';
+ map { $selected{$selnum{$_}} = '' } keys(%selnum);
+ $selected{$selnum{$default}} = ' selected="selected"';
$datatable .= ''
- .' '
+ .' '
.$default_names{$default}
.' | '
.' | '.&mt('Name:')
- .' |
';
+ .''
+ .' '
+ .&mt('Add category').''.&mt('Name:')
+ .' '
+ .' | ';
return $datatable;
}