Diff for /loncom/interface/slotrequest.pm between versions 1.131 and 1.132

version 1.131, 2015/10/05 02:35:45 version 1.132, 2016/05/21 21:13:58
Line 3035  sub csv_upload_assign { Line 3035  sub csv_upload_assign {
  }   }
   
  if ($entries{$fields{'startreserve'}}) {   if ($entries{$fields{'startreserve'}}) {
     $slot{'startreserve'}=              my $date = &UnixDate($entries{$fields{'startreserve'}},"%s");
  &UnixDate($entries{$fields{'startreserve'}},"%s");              if ($date eq '') {
                   push(@errors,"$name -- No reservation start time set for slot -- value provided had invalid format");
               } else {
                   $slot{'startreserve'} = $date;
               }
  }   }
  if (defined($slot{'startreserve'})   if (defined($slot{'startreserve'})
     && $slot{'startreserve'} > $slot{'starttime'}) {      && $slot{'startreserve'} > $slot{'starttime'}) {
Line 3045  sub csv_upload_assign { Line 3049  sub csv_upload_assign {
  }   }
   
         if ($entries{$fields{'endreserve'}}) {          if ($entries{$fields{'endreserve'}}) {
             $slot{'endreserve'}=              my $date = &UnixDate($entries{$fields{'endreserve'}},"%s");
                 &UnixDate($entries{$fields{'endreserve'}},"%s");              if ($date eq '') {
                   push(@errors,"$name -- No reservation end time set for slot -- value provided had invalid format");
               } else {
                   $slot{'endreserve'} = $date;
               }
         }          }
         if (defined($slot{'endreserve'})          if (defined($slot{'endreserve'})
             && $slot{'endreserve'} > $slot{'starttime'}) {              && $slot{'endreserve'} > $slot{'starttime'}) {
Line 3111  sub csv_upload_assign { Line 3119  sub csv_upload_assign {
             }              }
         }          }
  if ($entries{$fields{'uniqueperiod'}}) {   if ($entries{$fields{'uniqueperiod'}}) {
     my ($start,$end)=split(',',$entries{$fields{'uniqueperiod'}});              my ($start,$end)= map { &UnixDate($_,"%s"); } split(',',$entries{$fields{'uniqueperiod'}});
     my @times=(&UnixDate($start,"%s"),              if (($start ne '') && ($end ne '')) {
        &UnixDate($end,"%s"));                  $slot{'uniqueperiod'}=[$start,$end];
     $slot{'uniqueperiod'}=\@times;              } else {
                   push(@errors,"$name -- Slot's unique period ignored -- one or both of the comma separated values for start and end had an invalid format");
               }
  }   }
  if (defined($slot{'uniqueperiod'})   if (ref($slot{'uniqueperiod'}) eq 'ARRAY' 
     && $slot{'uniqueperiod'}[0] > $slot{'uniqueperiod'}[1]) {      && $slot{'uniqueperiod'}[0] > $slot{'uniqueperiod'}[1]) {
     push(@errors,"$name not created -- Slot's unique period start time is later than the unique period's end time.");      push(@errors,"$name not created -- Slot's unique period start time is later than the unique period's end time.");
     next;      next;

Removed from v.1.131  
changed lines
  Added in v.1.132


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>