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

raeburn raeburn at source.lon-capa.org
Wed Dec 21 11:53:03 EST 2011


raeburn		Wed Dec 21 16:53:03 2011 EDT

  Modified files:              
    /loncom/interface	lonnavmaps.pm 
  Log:
  - Wording change for reservable slots.
  - Delay determination of proctors until needed.
  - Iteration direction for ordered arrays of slots with reservations was the
    wrong way round.
    - currently reservable - find reservable slot with latest closing time for
      reservation window.
    - reservable inf future - find reservable slot with earliest opeing time for
      reservation window.
  
  
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.473 loncom/interface/lonnavmaps.pm:1.474
--- loncom/interface/lonnavmaps.pm:1.473	Tue Dec 20 22:41:31 2011
+++ loncom/interface/lonnavmaps.pm	Wed Dec 21 16:53:03 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Navigate Maps Handler
 #
-# $Id: lonnavmaps.pm,v 1.473 2011/12/20 22:41:31 raeburn Exp $
+# $Id: lonnavmaps.pm,v 1.474 2011/12/21 16:53:03 raeburn Exp $
 
 #
 # Copyright Michigan State University Board of Trustees
@@ -632,10 +632,10 @@
                 return &mt('Reserved - next open [_1]',
                            timeToHumanString($slot_time,'start'));
             } elsif ($slot_status == $res->RESERVABLE) {
-                return &mt('Reservable ending [_1]',
+                return &mt('Reservable, reservations close [_1]',
                            timeToHumanString($slot_time,'end'));
             } elsif ($slot_status == $res->RESERVABLE_LATER) {
-                return &mt('Reservable starting [_1]',
+                return &mt('Reservable, reservations open [_1]',
                            timeToHumanString($slot_time,'start'));
             } elsif ($slot_status == $res->NOT_IN_A_SLOT) {
                 return &mt('Reserve a time/place to work');
@@ -5115,10 +5115,6 @@
                 my $start = $slots{$slot_name}->{'starttime'};
                 my $ip = $slots{$slot_name}->{'ip'};
                 if ($self->simpleStatus() == OPEN) {
-                    my @proctors;
-                    if ($slots{$slot_name}->{'proctor'} ne '') {
-                        @proctors = split(',',$slots{$slot_name}->{'proctor'});
-                    }
                     if ($end > $now) {
                         if ($start > $now) {
                             return (RESERVED_LATER,$start,$slot_name);
@@ -5172,7 +5168,7 @@
                                                                $env{'user.domain'});
         if (ref($reservable) eq 'HASH') {
             if ((ref($reservable->{'now_order'}) eq 'ARRAY') && (ref($reservable->{'now'}) eq 'HASH')) {
-                foreach my $slot (@{$reservable->{'now_order'}}) {
+                foreach my $slot (reverse (@{$reservable->{'now_order'}})) {
                     if (($reservable->{'now'}{$slot}{'symb'} eq '') ||
                         ($reservable->{'now'}{$slot}{'symb'} eq $symb)) {
                         return(RESERVABLE,$reservable->{'now'}{$slot}{'endreserve'});
@@ -5180,7 +5176,7 @@
                 }
             }
             if ((ref($reservable->{'future_order'}) eq 'ARRAY') && (ref($reservable->{'future'}) eq 'HASH')) {
-                foreach my $slot (reverse (@{$reservable->{'future_order'}})) {
+                foreach my $slot (@{$reservable->{'future_order'}}) {
                     if (($reservable->{'future'}{$slot}{'symb'} eq '') ||
                         ($reservable->{'future'}{$slot}{'symb'} eq $symb)) {
                         return(RESERVABLE_LATER,$reservable->{'future'}{$slot}{'startreserve'});




More information about the LON-CAPA-cvs mailing list