--- loncom/interface/lonpopulate.pm 2021/03/31 02:19:59 1.86
+++ loncom/interface/lonpopulate.pm 2021/06/20 22:44:23 1.88
@@ -1,5 +1,5 @@
# automated enrollment configuration handler
-# $Id: lonpopulate.pm,v 1.86 2021/03/31 02:19:59 raeburn Exp $
+# $Id: lonpopulate.pm,v 1.88 2021/06/20 22:44:23 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -37,6 +37,7 @@ use Apache::lonuserutils;
use Apache::Constants qw(:common :http REDIRECT);
use Time::Local;
use LONCAPA::Enrollment;
+use LONCAPA qw(:DEFAULT :match);
###############################################################
sub header {
@@ -903,10 +904,12 @@ sub print_main_frame {
'.&mt('LON-CAPA section ID').' |
');
$r->print(&Apache::loncommon::end_data_table_row());
- for (my $i=0; $i<@xlists; $i++) {
+ my @showable;
+ &reformat_xlists($dom,$crs,$enrollvar{'coursecode'},\@xlists,\@showable);
+ for (my $i=0; $i<@showable; $i++) {
my $xl = ' ';
my $lc_sec = ' ';
- if ($xlists[$i] =~ /^([^:]+):?(.*)$/) {
+ if ($showable[$i] =~ /^([^:]+):?(.*)$/) {
$xl = $1;
$lc_sec = $2;
}
@@ -2063,8 +2066,10 @@ sub print_crosslistings_menu {
if ($crosscount > 0) {
$response .= &mt('The [quant,_1,course] listed below remain crosslisted with this LON-CAPA course, and students enrolling in these course sections will be automatically added to the class roster for the course, if you have chosen to enable a nightly automated enrollment update.',$crosscount).
'
'."\n";
- foreach my $xl (@xlists) {
- my ($xlist,$lc_sec) = split(/:/,$xl);
+ my @showable;
+ &reformat_xlists($dom,$crs,$coursecode,\@xlists,\@showable);
+ foreach my $item (@showable) {
+ my ($xlist,$lc_sec) = split(/:/,$item);
$response .=
'- '.&mt('[_1] - ID: [_2]',$xlist,$lc_sec).'
'."\n";
}
@@ -2074,26 +2079,86 @@ sub print_crosslistings_menu {
if ( exists($env{'form.numcross'}) ) {
my $numcross = $env{'form.numcross'};
if ($numcross) {
- $response .=
- &mt('You indicated that you wish to add an additional [quant,_1,crosslisting].',$numcross).' '.
- &mt('For each new crosslisting enter the institutional course section code (e.g., fs03zol101001, for section 001 of zol101 for fs03 semester), and the LON-CAPA section ID you wish to assign to students who will be enrolled in your LON-CAPA class as a result of their registration in the crosslisted course section.').' '.
- &mt('The LON-CAPA section ID can be left blank, if you do not wish to tie a section ID to this crosslisting.').' '.
- &mt("The institutional course section code should only contain letters and/or numbers, and must be consistent with the scheme adopted by your Domain Coordinator to map course codes (and section numbers) to your institution's student information system.").
- '
-