';
- if ($type eq 'Community') {
- $menu_html .= &mt('Although almost all community settings can be modified by a Coordinator, the following may only be set or modified by a Domain Coordinator:');
- } else {
- $menu_html .= &mt('Although almost all course settings can be modified by a Course Coordinator, the following may only be set or modified by a Domain Coordinator:');
- }
- $menu_html .= '
'.&mt('Community owner (permitted to assign Coordinator roles in the community).').'
'."\n".
- '
'.&mt('Override defaults for who configures self-enrollment for this specific community').'
'."\n";
- } else {
- $menu_html .= '
'.&mt('Course owner (permitted to assign Course Coordinator roles in the course).').'
'."\n".
- '
'.&mt("Institutional code and default authentication (both required for auto-enrollment of students from institutional datafeeds).").'
'."\n";
- if (($type ne 'Placement') && &showcredits($dom)) {
- $menu_html .= '
'.&mt('Default credits earned by student on course completion.').'
'."\n";
- }
- $menu_html .= '
'.&mt('Override defaults for who configures self-enrollment for this specific course.').'
'."\n";
- }
- $menu_html .= '
'.$mysqltables_text.'
'."\n".
- '
'.$setquota_text.'
'."\n".
- '
'.$setuploadquota_text.'
'."\n".
- '
'.$anon_text.'
'."\n".
- '
'.$postsubmit_text.'
'."\n";
- my ($categories_link_start,$categories_link_end);
- if ($permission->{'catsettings'} eq 'edit') {
- $categories_link_start = '';
- $categories_link_end = '';
+ .&mt($type).': '.$cdesc.''
+ .''."\n");
+ if ($extendedtype) {
+ $r->print('
'.&mt('Type').': '.&mt("$extendedtype $type").'
');
}
- foreach my $item (@additional_params) {
- if ($type eq 'Community') {
- if ($item eq 'togglecats') {
- $menu_html .= '
'.&mt('Hiding/unhiding a community from the catalog (although can be [_1]configured[_2] to be modifiable by a Coordinator in community context).',$categories_link_start,$categories_link_end).'
'.&mt('Manual cataloging of a community (although can be [_1]configured[_2] to be modifiable by a Coordinator in community context).',$categories_link_start,$categories_link_end).'
'.&mt('Hiding/unhiding a course from the course catalog (although can be [_1]configured[_2] to be modifiable by a Course Coordinator in course context).',$categories_link_start,$categories_link_end).'
'.&mt('Manual cataloging of a course (although can be [_1]configured[_2] to be modifiable by a Course Coordinator in course context).',$categories_link_start,$categories_link_end).'
'."\n";
- }
- }
- }
- $menu_html .=
- '
'
- .'');
+ .&hidden_form_elements()
+ .&Apache::lonhtmlcommon::generate_menu(@menu)
+ .'');
return;
}
@@ -632,9 +635,9 @@ sub print_adhocrole_selected {
}
$selectrole = 1;
} elsif ($permission->{'adhocrole'} eq 'custom') {
- my ($okroles,$description) = &Apache::lonnet::get_my_adhocroles($env{'form.pickedcourse'},1);
+ my ($okroles,$description) = &Apache::lonnet::get_my_adhocroles($env{'form.pickedcourse'},1);
if (ref($okroles) eq 'ARRAY') {
- my $possrole = $env{'form.adhocrole'};
+ my $possrole = $env{'form.adhocrole'};
if (($possrole ne '') && (grep(/^\Q$possrole\E$/,@{$okroles}))) {
my $confname = &Apache::lonnet::get_domainconfiguser($cdom);
$newrole = "cr/$cdom/$confname/$possrole./$cdom/$cnum";
@@ -684,9 +687,34 @@ sub print_settings_display {
"
$lt{'dcon'}
\n".
&Apache::loncommon::end_data_table_header_row()."\n";
foreach my $item (@items) {
+ my $shown = $enrollvar{$item};
+ if ($item eq 'crosslistings') {
+ my (@xlists,@lcsecs);
+ foreach my $entry (split(/,/,$enrollvar{$item})) {
+ my ($xlist,$lc_sec) = split(/:/,$entry);
+ push(@xlists,$xlist);
+ push(@lcsecs,$lc_sec);
+ }
+ if (@xlists) {
+ my $crskey = $cnum.':'.$enrollvar{'coursecode'};
+ my %reformatted =
+ &Apache::lonnet::auto_instsec_reformat($cdom,'declutter',
+ {$crskey => \@xlists});
+ if (ref($reformatted{$crskey}) eq 'ARRAY') {
+ my @show;
+ my @xlcodes = @{$reformatted{$crskey}};
+ for (my $i=0; $i<@xlcodes; $i++) {
+ push(@show,$xlcodes[$i].':'.$lcsecs[$i]);
+ }
+ if (@show) {
+ $shown = join(',',@show);
+ }
+ }
+ }
+ }
$disp_table .= &Apache::loncommon::start_data_table_row()."\n".
"
$longtype{$item}
\n".
- "
$enrollvar{$item}
\n";
+ "
$shown
\n";
if (grep(/^\Q$item\E$/,@modifiable_params)) {
$disp_table .= '
'.
+ ''."\n");
+ my @actions =
+ (''.
+ $lt{'back'}.'');
+ $r->print(' '.&Apache::lonhtmlcommon::actionbox(\@actions));
}
sub print_setquota {
my ($r,$cdom,$cnum,$cdesc,$type,$readonly) = @_;
my $lctype = lc($type);
- my $headline = &mt("Set disk space quotas for $lctype: [_1]",
- ''.$cdesc.'');
+ my $headline = '
'.&mt("Set disk space quotas for $lctype").'
'."\n".
+ '
'.&mt($type).': '.$cdesc.'
'."\n";
my %lt = &Apache::lonlocal::texthash(
'gpqu' => 'Disk space for storage of group portfolio files',
'upqu' => 'Disk space for storage of content directly uploaded to course via Content Editor',
@@ -746,15 +776,20 @@ sub print_setquota {
$cdom,$cnum);
my $coursequota = $settings{'internal.coursequota'};
my $uploadquota = $settings{'internal.uploadquota'};
- if ($coursequota eq '') {
- $coursequota = $staticdefaults{'coursequota'};
- }
- if ($uploadquota eq '') {
+ if (($uploadquota eq '') || ($coursequota eq '')) {
my %domdefs = &Apache::lonnet::get_domain_defaults($cdom);
my $quotatype = &Apache::lonuserutils::get_extended_type($cdom,$cnum,$type,\%settings);
- $uploadquota = $domdefs{$quotatype.'quota'};
if ($uploadquota eq '') {
- $uploadquota = $staticdefaults{'uploadquota'};
+ $uploadquota = $domdefs{$quotatype.'quota'};
+ if ($uploadquota eq '') {
+ $uploadquota = $staticdefaults{'uploadquota'};
+ }
+ }
+ if ($coursequota eq '') {
+ $coursequota = $domdefs{$quotatype.'coursequota'};
+ if ($coursequota eq '') {
+ $coursequota = $staticdefaults{'coursequota'};
+ }
}
}
&print_header($r,$type);
@@ -768,8 +803,8 @@ sub print_setquota {
$submit = '';
}
$r->print(<
-
$headline
$porthelpitem $lt{'gpqu'}: MB
@@ -782,9 +817,12 @@ $uploadhelpitem $lt{'upqu'}:
$hidden_elements
-$lt{'back'}
ENDDOCUMENT
+ my @actions =
+ (''.
+ $lt{'back'}.'');
+ $r->print(' '.&Apache::lonhtmlcommon::actionbox(\@actions));
return;
}
@@ -799,7 +837,7 @@ sub print_set_anonsurvey_threshold {
my %settings = &Apache::lonnet::get('environment',['internal.anonsurvey_threshold'],$cdom,$cnum);
my $threshold = $settings{'internal.anonsurvey_threshold'};
if ($threshold eq '') {
- my %domconfig =
+ my %domconfig =
&Apache::lonnet::get_dom('configuration',['coursedefaults'],$cdom);
if (ref($domconfig{'coursedefaults'}) eq 'HASH') {
$threshold = $domconfig{'coursedefaults'}{'anonsurvey_threshold'};
@@ -814,22 +852,26 @@ sub print_set_anonsurvey_threshold {
my $hidden_elements = &hidden_form_elements();
my ($disabled,$submit);
if ($readonly) {
- $disabled = ' disabled="disabled"';
+ $disabled = ' disabled="disabled"';
} else {
$submit = '';
}
my $helpitem = &Apache::loncommon::help_open_topic('Modify_Anonsurvey_Threshold');
+ my $showtype = &mt($type);
$r->print(<$lt{'resp'}
+