'.
- ' '.
+ ' '.
&mt('No limit').' '.
' '.
&mt('Limit by total students').' '.
@@ -4081,7 +4242,7 @@ ENDSCRIPT
}
$output .= &Apache::lonhtmlcommon::end_pick_box().
' '
+ .&mt('Save').'" onclick="validate_types(this.form);" />'
.' ';
$r->print($output);
return;
@@ -4164,7 +4325,8 @@ sub update_selfenroll_queue {
my $hostname = &Apache::lonnet::hostname($chome);
my $protocol = $Apache::lonnet::protocol{$chome};
$protocol = 'http' if ($protocol ne 'https');
- my (@existing,@missingreq,@invalidusers,@limitexceeded,@enrolled,@enrollerrors,);
+ my (@existing,@missingreq,@invalidusers,@limitexceeded,@enrolled,
+ @enrollerrors,@warn_approves,@warn_rejects);
my $now = time;
my $sender = $env{'user.name'}.':'.$env{'user.domain'};
my $approvedmsg = [{
@@ -4217,6 +4379,19 @@ sub update_selfenroll_queue {
$stucounts->{'selfenrolled'} ++;
&Apache::selfenroll::send_notification($uname.':'.$udom,$approvedmsg,$cid,
$coursedesc,$now,'enroller',$sender);
+ my %userrequest = (
+ $cdom.'_'.$cnum => {
+ timestamp => $now,
+ section => $usec,
+ adjudicator => $env{'user.name'}.':'.$env{'user.domain'},
+ status => 'approved',
+ }
+ );
+ my $userresult =
+ &Apache::lonnet::put($namespace,\%userrequest,$udom,$uname);
+ if ($userresult ne 'ok') {
+ push(@warn_approves,$uname.':'.$udom);
+ }
} else {
push(@enrollerrors,$uname.':'.$udom);
}
@@ -4230,6 +4405,19 @@ sub update_selfenroll_queue {
foreach my $user (@rejections) {
&Apache::selfenroll::send_notification($user,$rejectedmsg,$cid,
$coursedesc,$now,'enroller',$sender);
+ my ($uname,$udom) = split(/:/,$user);
+ my %userrequest = (
+ $cdom.'_'.$cnum => {
+ timestamp => $now,
+ adjudicator => $env{'user.name'}.':'.$env{'user.domain'},
+ status => 'rejected',
+ }
+ );
+ my $userresult =
+ &Apache::lonnet::put($namespace,\%userrequest,$udom,$uname);
+ if ($userresult ne 'ok') {
+ push(@warn_rejects,$user);
+ }
}
}
if (@changes) {
@@ -4239,7 +4427,7 @@ sub update_selfenroll_queue {
&Apache::loncommon::plainname($env{'user.name'},$env{'user.domain'}).' ('.$env{'user.name'}.':'.$env{'user.domain'}.')';
my $chgmsg = "'Action was taken on the following enrollment requests by [_1].',$namelink";
my ($approvedlist,$rejectedlist);
- if (@enrolled) {
+ if (@enrolled) {
$approvedlist = join("\n",@enrolled);
$r->print(''.&mt('The following were enrolled in the course:').'
');
foreach my $user (@enrolled) {
@@ -4298,6 +4486,20 @@ sub update_selfenroll_queue {
}
$r->print(' ');
}
+ if (@warn_approves) {
+ $r->print(''.&mt("For the following users, an error occurred when updating the user's own self-enroll requests record:").'
');
+ foreach my $user (@warn_approves) {
+ $r->print(''.$user.' ');
+ }
+ $r->print(' ');
+ }
+ if (@warn_rejects) {
+ $r->print(''.&mt("For the following users, an error occurred when updating the user's own self-enroll requests record:").'
');
+ foreach my $user (@warn_rejects) {
+ $r->print(''.$user.' ');
+ }
+ $r->print(' ');
+ }
return;
}
@@ -4329,7 +4531,7 @@ sub visible_in_cat {
miss => 'Your course does not currently appear in the Course Catalog for this domain.',
yous => 'You should remedy this if you plan to allow self-enrollment, otherwise students will have difficulty finding your course.',
coca => 'Courses can be absent from the Catalog, because they do not have an institutional code, have no assigned category, or have been specifically excluded.',
- make => 'Make any changes to self-enrollment settings below, click "Save changes", then take action to include the course in the Catalog:',
+ make => 'Make any changes to self-enrollment settings below, click "Save", then take action to include the course in the Catalog:',
take => 'Take the following action to ensure the course appears in the Catalog:',
dc_unhide => 'Ask a domain coordinator to change the "Exclude from course catalog" setting.',
dc_addinst => 'Ask a domain coordinator to enable display the catalog of "Official courses (with institutional codes)".',