--- loncom/interface/lonmodifycourse.pm 2017/01/05 16:17:11 1.90 +++ loncom/interface/lonmodifycourse.pm 2023/06/05 02:22:29 1.100 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # handler for DC-only modifiable course settings # -# $Id: lonmodifycourse.pm,v 1.90 2017/01/05 16:17:11 raeburn Exp $ +# $Id: lonmodifycourse.pm,v 1.100 2023/06/05 02:22:29 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -39,6 +39,9 @@ use Apache::lonpickcourse; use lib '/home/httpd/lib/perl'; use LONCAPA qw(:DEFAULT :match); +my $registered_cleanup; +my $modified_dom; + sub get_dc_settable { my ($type,$cdom) = @_; if ($type eq 'Community') { @@ -49,6 +52,10 @@ sub get_dc_settable { if (&showcredits($cdom)) { push(@items,'defaultcredits'); } + my %passwdconf = &Apache::lonnet::get_passwdconf($cdom); + if (($passwdconf{'crsownerchg'}) && ($type ne 'Placement')) { + push(@items,'nopasswdchg'); + } return @items; } } @@ -101,6 +108,7 @@ sub get_enrollment_settings { @items = map { 'internal.'.$_; } (@{$internals}); push(@items,@{$accessdates}); } + push(@items,'internal.nopasswdchg'); my %settings = &Apache::lonnet::get('environment',\@items,$cdom,$cnum); my %enrollvar; $enrollvar{'autharg'} = ''; @@ -126,7 +134,7 @@ sub get_enrollment_settings { } elsif ($type eq "authtype" || $type eq "autharg" || $type eq "coursecode" || $type eq "crosslistings" || $type eq "selfenrollmgr" - || $type eq "autodropfailsafe") { + || $type eq "autodropfailsafe" || $type eq 'nopasswdchg') { $enrollvar{$type} = $settings{$item}; } elsif ($type eq 'defaultcredits') { if (&showcredits($cdom)) { @@ -289,10 +297,12 @@ function gochoose(cname,cdom,cdesc) { document.courselist.submit(); } else { var str = ''; + \$("#LC_choose_adhoc").empty(); for (var i=0; i"+data.roles[i].desc+"  ") .appendTo("#LC_choose_adhoc"); } + \$( "#LC_adhocrole_chooser" ).toggle( true ); \$( "#LC_get_role_0").prop("checked", true); \$( "#LC_adhocrole_chooser" ).dialog({ autoOpen: false }); \$( "#LC_adhocrole_chooser" ).dialog("open"); @@ -338,7 +348,7 @@ function gochoose(cname,cdom,cdesc) { // ]]> -
+