--- loncom/interface/courseprefs.pm 2016/10/24 18:10:08 1.49.2.21
+++ loncom/interface/courseprefs.pm 2017/03/14 12:29:42 1.49.2.23
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set configuration settings for a course
#
-# $Id: courseprefs.pm,v 1.49.2.21 2016/10/24 18:10:08 raeburn Exp $
+# $Id: courseprefs.pm,v 1.49.2.23 2017/03/14 12:29:42 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1973,7 +1973,10 @@ sub print_courseinfo {
unless ((ref($settings) eq 'HASH') && (ref($ordered) eq 'ARRAY') && (ref($itemtext) eq 'HASH')) {
return;
}
- my ($cathash,$categoriesform,$autocoowner,$clonedefaults);
+ my ($cathash,$categoriesform,$autocoowner,$clonedefaults,$disabled);
+ if ($noedit) {
+ $disabled = ' disabled="disabled"';
+ }
my %domconf =
&Apache::lonnet::get_dom('configuration',
['coursecategories','autoenroll','coursedefaults'],$cdom);
@@ -1982,7 +1985,7 @@ sub print_courseinfo {
if (ref($cathash) eq 'HASH') {
$categoriesform =
&Apache::loncommon::assign_categories_table($cathash,
- $settings->{'categories'},$crstype)."\n";
+ $settings->{'categories'},$crstype,$disabled)."\n";
}
}
if (ref($domconf{'autoenroll'}) eq 'HASH') {
@@ -2049,14 +2052,20 @@ sub print_courseinfo {
} else {
$replace = &mt('To replace the standard title for a course role, enter a title, otherwise leave blank');
}
+ my ($editmap,$editsyllabus);
+ unless ($noedit) {
+ $editmap = (' 'x2).
+ '".
+ &mt('Select Map').'
'.
+ &mt('Modification may make assessment data inaccessible!').
+ '';
+ $editsyllabus = &mt('[_1]Edit[_2]','',
+ '');
+ }
my %items = (
'url' => {
- text => ''.&mt($itemtext->{'url'}).''.(' 'x2).
- '".
- &mt('Select Map').'
'.
- &mt('Modification may make assessment data inaccessible!').
- '',
+ text => ''.&mt($itemtext->{'url'}).''.$editmap,
input => 'textbox',
size => '55',
advanced => 1
@@ -2101,8 +2110,7 @@ sub print_courseinfo {
'externalsyllabus' => {
text => ''.&mt($itemtext->{'externalsyllabus'}).'
'.
&mt('(Syllabus type in use)').(' ' x2).
- &mt('[_1]Edit[_2]','',
- ''),
+ $editsyllabus,
},
'hidefromcat' => {
text => ''.&mt($itemtext->{'hidefromcat'}).'
'.
@@ -2124,10 +2132,6 @@ sub print_courseinfo {
);
my $datatable;
my $count = 0;
- my $disabled;
- if ($noedit) {
- $disabled = ' disabled="disabled"';
- }
foreach my $item (@{$ordered}) {
my $colspan;
if ($item eq 'hidefromcat') {