version 1.51, 2010/03/15 19:10:59
|
version 1.53, 2010/03/31 20:09:07
|
Line 779 sub modify_course {
|
Line 779 sub modify_course {
|
my $outcome = &Apache::lonnet::auto_new_course($cnum,$cdom,$inst_course_id,$newattr{'courseowner'}); |
my $outcome = &Apache::lonnet::auto_new_course($cnum,$cdom,$inst_course_id,$newattr{'courseowner'}); |
unless ($outcome eq 'ok') { |
unless ($outcome eq 'ok') { |
|
|
push(@warnings,&mt('If automatic enrollment is enabled for "[_1]" automated enrollment may fail for "[_2]" - section: [_3], for the following reason: "[_4]"',$description,$newattr{'coursecode'},$instsec,$outcome).'<br/>'); |
push(@warnings,&mt('If automatic enrollment is enabled for "[_1]", automated enrollment may fail for "[_2]" - section: [_3] for the following reason: "[_4]".',$description,$newattr{'coursecode'},$instsec,$outcome).'<br/>'); |
} |
} |
} else { |
} else { |
push(@warnings,&mt('If automatic enrollment is enabled for "[_1]" automated enrollment may fail for "[_2]" - section: [_3], for the following reason: "[_4]"',$description,$newattr{'coursecode'},$instsec,$course_check)); |
push(@warnings,&mt('If automatic enrollment is enabled for "[_1]", automated enrollment may fail for "[_2]" - section: [_3] for the following reason: "[_4]".',$description,$newattr{'coursecode'},$instsec,$course_check)); |
} |
} |
} else { |
} else { |
push(@warnings,&mt('If automatic enrollment is enabled for "[_1]", automated enrollment may fail for "[_2]" - section: [_3], because this is not a valid section entry.',$description,$newattr{'coursecode'},$sec)); |
push(@warnings,&mt('If automatic enrollment is enabled for "[_1]", automated enrollment may fail for "[_2]" - section: [_3], because this is not a valid section entry.',$description,$newattr{'coursecode'},$sec)); |
Line 795 sub modify_course {
|
Line 795 sub modify_course {
|
my $inst_course_id = $newattr{'coursecode'}.$instsec; |
my $inst_course_id = $newattr{'coursecode'}.$instsec; |
my $outcome = &Apache::lonnet::auto_new_course($cnum,$cdom,$inst_course_id,$newattr{'courseowner'}); |
my $outcome = &Apache::lonnet::auto_new_course($cnum,$cdom,$inst_course_id,$newattr{'courseowner'}); |
unless ($outcome eq 'ok') { |
unless ($outcome eq 'ok') { |
push(@warnings,&mt('If automatic enrollment is enabled for "[_1]", automated enrollment may fail for "[_2]" - section [_3] for the following reason: "[_4]".',$description,$newattr{'coursecode'},$instsec,$outcome)); |
push(@warnings,&mt('If automatic enrollment is enabled for "[_1]", automated enrollment may fail for "[_2]" - section: [_3] for the following reason: "[_4]".',$description,$newattr{'coursecode'},$instsec,$outcome)); |
} |
} |
} else { |
} else { |
push(@warnings,&mt('If automatic enrollment is enabled for "[_1]", automated enrollment may fail for "[_2]" - section [_3] because this is not a valid section entry.',$description,$newattr{'coursecode'},$sec)); |
push(@warnings,&mt('If automatic enrollment is enabled for "[_1]", automated enrollment may fail for "[_2]" - section: [_3], because this is not a valid section entry.',$description,$newattr{'coursecode'},$sec)); |
} |
} |
} |
} |
} |
} |
} else { |
} else { |
push(@warnings,&mt('As no section numbers are currently listed for "[_1]" automated enrollment will not occur for any sections of institutional course code: "[_2]".',$description,$newattr{'coursecode'})); |
push(@warnings,&mt('As no section numbers are currently listed for "[_1]", automated enrollment will not occur for any sections of institutional course code: "[_2]".',$description,$newattr{'coursecode'})); |
} |
} |
if ( (@xlists > 0) && ($changed{'owner'}) ) { |
if ( (@xlists > 0) && ($changed{'owner'}) ) { |
foreach my $xlist (@xlists) { |
foreach my $xlist (@xlists) { |
Line 931 sub update_coowners {
|
Line 931 sub update_coowners {
|
my %pendinghash = ( |
my %pendinghash = ( |
'internal.pendingco-owners' => $pendingcoowners, |
'internal.pendingco-owners' => $pendingcoowners, |
); |
); |
my $putresult = &put('environment',\%pendinghash,$cdom,$cnum); |
my $putresult = &Apache::lonnet::put('environment',\%pendinghash,$cdom,$cnum); |
if ($putresult eq 'ok') { |
if ($putresult eq 'ok') { |
if ($env{'course.'.$cid.'.num'} eq $cnum) { |
if ($env{'course.'.$cid.'.num'} eq $cnum) { |
&appenv({'course.'.$cid.'.internal.pendingco-owners' => $pendingcoowners}); |
&Apache::lonnet::appenv({'course.'.$cid.'.internal.pendingco-owners' => $pendingcoowners}); |
} |
} |
} |
} |
} else { |
} else { |