--- loncom/interface/lonpopulate.pm 2003/12/11 02:54:51 1.5
+++ loncom/interface/lonpopulate.pm 2004/04/16 13:26:44 1.11
@@ -1,5 +1,5 @@
# automated enrollment configuration handler
-# $Id: lonpopulate.pm,v 1.5 2003/12/11 02:54:51 raeburn Exp $
+# $Id: lonpopulate.pm,v 1.11 2004/04/16 13:26:44 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -27,13 +27,13 @@ package Apache::lonpopulate;
use strict;
use lib qw(/home/httpd/lib/perl);
-use Apache::lonnet ();
-use Apache::loncommon ();
-use Apache::lonhtmlcommon ();
+use Apache::lonnet;
+use Apache::loncommon;
+use Apache::lonhtmlcommon;
use Apache::lonlocal;
use Apache::Constants qw(:common :http REDIRECT);
use Time::Local;
-use LONCAPA::Enrollment ();
+use LONCAPA::Enrollment;
use localenroll;
###############################################################
@@ -329,17 +329,29 @@ Note: Any students added manually by cou
");
} elsif ($action eq "setdates") {
my ($start_table,$end_table) = &date_setting_table($enrollvar{autostart},$enrollvar{autoend});
- my $oldstartshow = localtime($enrollvar{autostart});
- my $oldendshow = localtime($enrollvar{autoend});
- if ($enrollvar{autoend} == 0) {
- $oldendshow = "No ending date";
+ my $oldstartshow = '';
+ my $oldendshow = '';
+ if ( defined($enrollvar{autostart}) ) {
+ $oldstartshow = localtime($enrollvar{autostart});
+ }
+ if ( defined($enrollvar{autoend}) ) {
+ $oldendshow = localtime($enrollvar{autoend});
+ if ($enrollvar{autoend} == 0) {
+ $oldendshow = "No ending date";
+ }
+ }
+ my $dateshow;
+ if ( ($oldendshow eq '') && ($oldstartshow eq '') ) {
+ $dateshow = " Warning. Currently NO first enrollment or last enrollment dates are set. You must use this menu to set a start date and an end date (or check the 'no ending date' checkbox) if you plan to utilise automated adds and/or drops in this course.\n";
+ } else {
+ $dateshow = "Currently: First enrollment: $oldstartshow, Last enrollment: $oldendshow\n";
}
$r->print(<
-
$$tasktitleref{$action}
- Currently: First enrollment: $oldstartshow, Last enrollment: $oldendshow
+
-Select which course coordinators should receive information about roster changes whenever any adds or drops occur during the nightly enrollment check.
-
+
The table below contains a list of course coordinators in this course. Uncheck the 'Notification?' checkbox for each person who is to be removed from the list of recipients who are currently informed of roster changes whenever any adds or drops occur during the nightly enrollment check. To include individuals who are not currently recipients, simply check the 'Notification?' checkbox. Click 'Go' to store your changes.
- Select more than one recipient by using the following keyboard and mouse combinations:
-
-
Apple-click: MacOS
-
Ctrl-click: Windows
-
Left click: Linux
-
-
-
+
+
+
Name
+
username
+
Current status
+
Notification?
+
");
- } else {
+ for (my $i=0; $i<@ccs; $i++) {
+ my $colflag = $i%2;
+ $r->print("
-As you are the only user with the role of course coordinator in this course, if you choose to enable notification of roster changes, you will be the sole recipient of LON-CAPA messages generated whenever any adds or drops occur during the nightly enrollment check.
-
-
-
+
+
+
+
+
+
+
+
+
+
+
");
+ } else {
+ $r->print("
+
+
+ No course coordinators found.
+
+
");
}
$r->print("
-
-
-
-
-
-
-
-
-
+
+
+
+
+
");
} elsif ($action eq "crosslist") {
my @xlists = ();
@@ -526,7 +573,7 @@ As you are the only user with the role o
");
if ($cross_str > 0) {
$r->print("
- Currently, LON-CAPA course: $realm ($enrollvar{coursecode}) is crosslisted with $cross_str course section(s). 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. For each crosslisting, leave the checkbox checked if you want registered students in that course to be included in the student roster for LON-CAPA course: $realm ($enrollvar{coursecode}); otherwise uncheck it. If you wish to change the section/group ID assigned in your LON-CAPA course for a crosslisted course, enter the new section/group ID in the appropriate textbox. The LON-CAPA section/group ID can be left (or set to) empty, if you do not wish to tie a section/group ID to this crosslisting. If you wish to add new crosslisted courses, enter the number of new courses to add in the textbox at the bottom of the page. You will provide information about each of the new crosslistings on a subsequent page. Click 'Go' to store your changes.
+ Currently, this LON-CAPA course is crosslisted with $cross_str course section(s). 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. For each crosslisting, leave the checkbox checked if you want registered students in that course to be included in the student roster for LON-CAPA course: $realm ($enrollvar{coursecode}); otherwise uncheck it. If you wish to change the section/group ID assigned in your LON-CAPA course for a crosslisted course, enter the new section/group ID in the appropriate textbox. The LON-CAPA section/group ID can be left (or set to) empty, if you do not wish to tie a section/group ID to this crosslisting. If you wish to add new crosslisted courses, enter the number of new courses to add in the textbox at the bottom of the page. You will provide information about each of the new crosslistings on a subsequent page. Click 'Go' to store your changes.
@@ -610,9 +657,8 @@ As you are the only user with the role o
}
}
if (@sections > 0) {
- if (@sections > 1) {
- my $secshow = @sections;
- $r->print("
+ my $secshow = @sections;
+ $r->print("