version 1.213, 2022/12/01 01:28:26
|
version 1.217, 2023/10/02 21:01:21
|
Line 616 sub print_roles_queued {
|
Line 616 sub print_roles_queued {
|
$output .= '</ul></p>'; |
$output .= '</ul></p>'; |
if (keys(%touser)) { |
if (keys(%touser)) { |
foreach my $key (keys(%touser)) { |
foreach my $key (keys(%touser)) { |
my ($uname,$udom) = split(/:/,$touser{$key}); |
my ($uname,$udom) = split(/:/,$key); |
if (&Apache::lonnet::put('nohist_queuedrolereqs',$touser{$key},$udom,$uname) eq 'ok') { |
if (&Apache::lonnet::put('nohist_queuedrolereqs',$touser{$key},$udom,$uname) eq 'ok') { |
my $owndomdesc = &Apache::lonnet::domain($udom); |
my $owndomdesc = &Apache::lonnet::domain($udom); |
&Apache::loncoursequeueadmin::send_selfserve_notification($uname.':'.$udom, |
&Apache::loncoursequeueadmin::send_selfserve_notification($uname.':'.$udom, |
Line 1065 END
|
Line 1065 END
|
"; |
"; |
} elsif ($mode eq 'modifycourse') { |
} elsif ($mode eq 'modifycourse') { |
$auth_checks .= " |
$auth_checks .= " |
if (vf.elements[current.argfield].value == null || vf.elements[current.argfield].value == '') { |
if ((current.argfield !== null) && (current.argfield !== undefined) && (current.argfield !== '') && (vf.elements[current.argfield].value == null || vf.elements[current.argfield].value == '')) { |
"; |
"; |
} |
} |
if ( ($mode eq 'createcourse') || ($mode eq 'modifycourse') ) { |
if ( ($mode eq 'createcourse') || ($mode eq 'modifycourse') ) { |
Line 4723 sub upfile_drop_add {
|
Line 4723 sub upfile_drop_add {
|
$fieldstype{$field.'_choice'} = 'scalar'; |
$fieldstype{$field.'_choice'} = 'scalar'; |
} |
} |
&Apache::loncommon::store_course_settings('enrollment_upload',\%fieldstype); |
&Apache::loncommon::store_course_settings('enrollment_upload',\%fieldstype); |
my ($cid,$crstype,$setting,$crsdom,$crsnum); |
my ($cid,$crstype,$setting,$crsdom,$crsnum,$oldcrsuserdoms); |
if ($context eq 'domain') { |
if ($context eq 'domain') { |
$setting = $env{'form.roleaction'}; |
$setting = $env{'form.roleaction'}; |
} |
} |
Line 4738 sub upfile_drop_add {
|
Line 4738 sub upfile_drop_add {
|
$crstype = &Apache::loncommon::course_type($cid); |
$crstype = &Apache::loncommon::course_type($cid); |
$crsdom = $env{'form.dcdomain'}; |
$crsdom = $env{'form.dcdomain'}; |
$crsnum = $env{'form.dccourse'}; |
$crsnum = $env{'form.dccourse'}; |
|
if (exists($env{'course.'.$cid.'.internal.userdomains'})) { |
|
$oldcrsuserdoms = 1; |
|
} |
|
my %coursedesc = &Apache::lonnet::coursedescription($cid,{ one_time => 1 }); |
|
$env{'course.'.$cid.'.internal.userdomains'} = $coursedesc{'internal.userdomains'}; |
} |
} |
} |
} |
my ($startdate,$enddate) = &get_dates_from_form(); |
my ($startdate,$enddate) = &get_dates_from_form(); |
Line 5564 sub upfile_drop_add {
|
Line 5569 sub upfile_drop_add {
|
} # end of loop |
} # end of loop |
$r->print('</ul>'); |
$r->print('</ul>'); |
&Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state); |
&Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state); |
|
if (($context eq 'domain') && ($setting eq 'course')) { |
|
unless ($oldcrsuserdoms) { |
|
if (exists($env{'course.'.$cid.'.internal.userdomains'})) { |
|
delete($env{'course.'.$cid.'.internal.userdomains'}); |
|
} |
|
} |
|
} |
} |
} |
# Flush the course logs so reverse user roles immediately updated |
# Flush the course logs so reverse user roles immediately updated |
$r->register_cleanup(\&Apache::lonnet::flushcourselogs); |
$r->register_cleanup(\&Apache::lonnet::flushcourselogs); |
Line 6780 sub get_permission {
|
Line 6792 sub get_permission {
|
$permission{'selfenrolladmin'} = 1; |
$permission{'selfenrolladmin'} = 1; |
} |
} |
} |
} |
|
unless ($permission{'selfenrolladmin'}) { |
|
$permission{'selfenrollview'} = 1; |
|
} |
} |
} |
if ($env{'request.course.id'}) { |
if ($env{'request.course.id'}) { |
my $user; |
my $user; |
Line 7243 sub selfenrollment_administration {
|
Line 7258 sub selfenrollment_administration {
|
} |
} |
} |
} |
if ($settings{'internal.selfenrollmgrdc'} ne '') { |
if ($settings{'internal.selfenrollmgrdc'} ne '') { |
my @in_domain = split(/,/,$settings{'internal.selfenrollmgrdc'}); |
@in_domain = split(/,/,$settings{'internal.selfenrollmgrdc'}); |
my @diffs = &Apache::loncommon::compare_arrays(\@in_domain,$possconfigs); |
my @diffs = &Apache::loncommon::compare_arrays(\@in_domain,$possconfigs); |
unless (@diffs) { |
unless (@diffs) { |
return (\@in_course,\@in_domain); |
return (\@in_course,\@in_domain); |