--- loncom/interface/lonmodifycourse.pm 2024/08/26 10:48:59 1.79.2.9.2.7 +++ loncom/interface/lonmodifycourse.pm 2024/12/30 00:34:19 1.79.2.10 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # handler for DC-only modifiable course settings # -# $Id: lonmodifycourse.pm,v 1.79.2.9.2.7 2024/08/26 10:48:59 raeburn Exp $ +# $Id: lonmodifycourse.pm,v 1.79.2.10 2024/12/30 00:34:19 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -97,7 +97,7 @@ sub get_enrollment_settings { my ($cdom,$cnum) = @_; my ($internals,$accessdates) = &autoenroll_keys(); my @items; - if ((ref($internals) eq 'ARRAY') && (ref($accessdates) eq 'ARRAY')) { + if ((ref($internals) eq 'ARRAY') && (ref($accessdates) eq 'ARRAY')) { @items = map { 'internal.'.$_; } (@{$internals}); push(@items,@{$accessdates}); } @@ -391,8 +391,7 @@ sub get_filters { sub print_modification_menu { my ($r,$cdesc,$domdesc,$dom,$type,$cid,$coursehash,$permission) = @_; &print_header($r,$type); - my ($ccrole,$categorytitle,$setquota_text,$setuploadquota_text,$cdom,$cnum, - $extendedtype); + my ($ccrole,$categorytitle,$setquota_text,$setuploadquota_text,$cdom,$cnum); if (ref($coursehash) eq 'HASH') { $cdom = $coursehash->{'domain'}; $cnum = $coursehash->{'num'}; @@ -411,9 +410,6 @@ sub print_modification_menu { 'setanon' => 'View/Modify responders threshold for anonymous survey submissions display', 'selfenroll' => 'View/Modify Self-Enrollment configuration', 'setpostsubmit' => 'View/Modify submit button behavior, post-submission', - 'setltiauth' => 'View/Modify re-authentication requirement for LTI launch of deep-linked item', - 'setexttool' => 'View/Modify External Tools permissions', - 'setcrseditors' => 'View/Modify permitted course resource editors', ); } else { %linktext = ( @@ -421,19 +417,16 @@ sub print_modification_menu { 'setanon' => 'View responders threshold for anonymous survey submissions display', 'selfenroll' => 'View Self-Enrollment configuration', 'setpostsubmit' => 'View submit button behavior, post-submission', - 'setltiauth' => 'View re-authentication requirement for LTI launch of deep-linked item', - 'setexttool' => 'View External Tools permissions', - 'setcrseditors' => 'View permitted course resource editors', ); } if ($type eq 'Community') { if ($permission->{'setparms'} eq 'edit') { $categorytitle = 'View/Modify Community Settings'; - $linktext{'setparms'} = 'View/Modify community owner, self-enrollment and table lifetime'; + $linktext{'setparms'} = 'View/Modify community owner'; $linktext{'catsettings'} = 'View/Modify catalog settings for community'; } else { $categorytitle = 'View Community Settings'; - $linktext{'setparms'} = 'View community owner, self-enrollment and table lifetime'; + $linktext{'setparms'} = 'View community owner'; $linktext{'catsettings'} = 'View catalog settings for community'; } $setquota_text = &mt('Total disk space allocated for storage of portfolio files in all groups in a community.'); @@ -458,15 +451,10 @@ sub print_modification_menu { } $setquota_text = &mt('Total disk space allocated for storage of portfolio files in all groups in a course.'); $setuploadquota_text = &mt('Disk space allocated for storage of content uploaded directly to a course via Content Editor.'); - my %settings = &Apache::lonnet::get('environment',['internal.coursecode','internal.textbook'], - $cdom,$cnum); - $extendedtype = ucfirst(&Apache::lonuserutils::get_extended_type($cdom,$cnum,$type,\%settings)); } my $anon_text = &mt('Responder threshold required to display anonymous survey submissions.'); - my $postsubmit_text = &mt('Override defaults for submit button behavior post-submission for this specific course.'); + my $postsubmit_text = &mt('Override defaults for submit button behavior post-submission for this specific course.'); my $mysqltables_text = &mt('Override default for lifetime of "temporary" MySQL tables containing student performance data.'); - my $ltiauth_text = &mt('Override default for requirement for re-authentication for LTI-limited launch of deep-linked item.'); - my $exttool_text = &mt('Override default permissions for external tools use for this specific course.'); $linktext{'viewparms'} = 'Display current settings for automated enrollment'; my %domconf = &Apache::lonnet::get_dom('configuration',['coursecategories'],$dom); @@ -548,47 +536,66 @@ sub print_modification_menu { permission => $permission->{'setpostsubmit'}, linktitle => '', }, - { - linktext => $linktext{'setltiauth'}, - icon => 'system-lock-screen.png', - #help => '', - url => &phaseurl('setltiauth'), - permission => $permission->{'setltiauth'}, - linktitle => '', - }, - { - linktext => $linktext{'setexttool'}, - icon => 'exttool.png', - #help => '', - url => &phaseurl('setexttool'), - permission => $permission->{'setexttool'}, - linktitle => '', - }, - { - linktext => $linktext{'setcrseditors'}, - icon => 'crseditors.png', - #help => '', - url => &phaseurl('setcrseditors'), - permission => $permission->{'setcrseditors'}, - linktitle => '', - }, ] }, ); - $r->print( + my $menu_html = '
'; + 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:'); } - $r->print( - '
'); + .&hidden_form_elements(); + + $r->print($menu_html); + $r->print(&Apache::lonhtmlcommon::generate_menu(@menu)); + $r->print(''); return; } @@ -706,32 +713,30 @@ sub print_settings_display { $setparms_link_start = ''; $setparms_link_end = ''; } - $r->print(''.$lt{'cour'}.'
'.$disp_table.'
'. + ''.$lt{'back'}.''."\n". + &hidden_form_elements(). + '
' + ); } sub print_setquota { my ($r,$cdom,$cnum,$cdesc,$type,$readonly) = @_; my $lctype = lc($type); - my $headline = '
$porthelpitem $lt{'gpqu'}: MB
@@ -787,12 +787,9 @@ $uploadhelpitem $lt{'upqu'}:
$hidden_elements
+$lt{'back'}
ENDDOCUMENT
- my @actions =
- (''.
- $lt{'back'}.'');
- $r->print('
'.&Apache::lonhtmlcommon::actionbox(\@actions));
return;
}
@@ -807,7 +804,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'};
@@ -827,21 +824,17 @@ sub print_set_anonsurvey_threshold {
$submit = '';
}
my $helpitem = &Apache::loncommon::help_open_topic('Modify_Anonsurvey_Threshold');
- my $showtype = &mt($type);
$r->print(<$showtype: $cdesc