[LON-CAPA-cvs] cvs: loncom /interface slotrequest.pm

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 17 Oct 2005 19:26:51 -0000


albertel		Mon Oct 17 15:26:51 2005 EDT

  Modified files:              
    /loncom/interface	slotrequest.pm 
  Log:
  - don't print Wed Dec 31 19:00:00 1969 when times are unset
  
  
Index: loncom/interface/slotrequest.pm
diff -u loncom/interface/slotrequest.pm:1.23 loncom/interface/slotrequest.pm:1.24
--- loncom/interface/slotrequest.pm:1.23	Mon Oct 17 14:23:46 2005
+++ loncom/interface/slotrequest.pm	Mon Oct 17 15:26:50 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler for requesting to have slots added to a students record
 #
-# $Id: slotrequest.pm,v 1.23 2005/10/17 18:23:46 albertel Exp $
+# $Id: slotrequest.pm,v 1.24 2005/10/17 19:26:50 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -521,9 +521,13 @@
 	    my (undef,$id)=split("\0",$entry);
 	    $ids.= $id.'-> '.$consumed{$entry}->{'name'}.'<br />';
 	}
-	my $start=&Apache::lonlocal::locallocaltime($slots{$slot}->{'starttime'});
-	my $end=&Apache::lonlocal::locallocaltime($slots{$slot}->{'endtime'});
-	my $start_reserve=&Apache::lonlocal::locallocaltime($slots{$slot}->{'startreserve'});
+	my $start=($slots{$slot}->{'starttime'}?
+		   &Apache::lonlocal::locallocaltime($slots{$slot}->{'starttime'}):'');
+	my $end=($slots{$slot}->{'endtime'}?
+		 &Apache::lonlocal::locallocaltime($slots{$slot}->{'endtime'}):'');
+	my $start_reserve=($slots{$slot}->{'endtime'}?
+			   &Apache::lonlocal::locallocaltime($slots{$slot}->{'startreserve'}):'');
+	
 	my $unique;
 	if (ref($slots{$slot}{'uniqueperiod'})) {
 	    $unique=localtime($slots{$slot}{'uniqueperiod'}[0]).','.