--- loncom/interface/lonpopulate.pm 2003/12/15 07:55:59 1.7
+++ 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.7 2003/12/15 07:55:59 raeburn Exp $
+# $Id: lonpopulate.pm,v 1.11 2004/04/16 13:26:44 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -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
+
$$tasktitleref{$action}
+ $dateshow
@@ -645,9 +657,8 @@ ENDTWO
}
}
if (@sections > 0) {
- if (@sections > 1) {
- my $secshow = @sections;
- $r->print("
+ my $secshow = @sections;
+ $r->print("