Diff for /loncom/interface/slotrequest.pm between versions 1.40 and 1.42

version 1.40, 2006/02/03 18:22:44 version 1.42, 2006/02/03 18:53:08
Line 47  sub fail { Line 47  sub fail {
  $r->print('<p>'.&mt('Failed.').'</p>');   $r->print('<p>'.&mt('Failed.').'</p>');
     }      }
           
     $r->print('<p><a href="/adm/flip?postdata=return:">'.      &return_link($r);
       &mt('Return to last resource').'</a></p>');  
     &end_page($r);      &end_page($r);
 }  }
   
Line 126  sub check_for_reservation { Line 125  sub check_for_reservation {
     my ($cnum,$cdom)=&get_course();      my ($cnum,$cdom)=&get_course();
     my %slots=&Apache::lonnet::get('slots', [@slots], $cdom, $cnum);      my %slots=&Apache::lonnet::get('slots', [@slots], $cdom, $cnum);
   
       if (&network_error($student) || &network_error($course)  ||
    &network_error(%slots)) {
    return 'error: Unable to determine current status';
       }    
     foreach my $slot_name (@slots) {      foreach my $slot_name (@slots) {
  next if (!defined($slots{$slot_name}) ||   next if (!defined($slots{$slot_name}) ||
  !ref($slots{$slot_name}));   !ref($slots{$slot_name}));
Line 150  sub check_for_conflict { Line 153  sub check_for_conflict {
     my @slots = (split(/:/,$student), split(/:/, $course));      my @slots = (split(/:/,$student), split(/:/, $course));
     my ($cnum,$cdom)=&get_course();      my ($cnum,$cdom)=&get_course();
     my %slots=&Apache::lonnet::get('slots', [@slots], $cdom, $cnum);      my %slots=&Apache::lonnet::get('slots', [@slots], $cdom, $cnum);
     my ($tmp) = %slots;  
     if (&network_error($student) || &network_error($course)  ||      if (&network_error($student) || &network_error($course)  ||
  &network_error($tmp)) {   &network_error(%slots)) {
  return 'error: Unable to determine current status';   return 'error: Unable to determine current status';
     }          }    
     foreach my $slot_name (@slots) {      foreach my $slot_name (@slots) {
Line 304  sub release_slot { Line 307  sub release_slot {
     if ($mgr ne 'F') {      if ($mgr ne 'F') {
  if ($slot{$slot_name}{'starttime'} < time) {   if ($slot{$slot_name}{'starttime'} < time) {
     $r->print("<p>Not allowed to release Reservation: $description, as it has already ended.</p>");      $r->print("<p>Not allowed to release Reservation: $description, as it has already ended.</p>");
     $r->print('<p><a href="/adm/flip?postdata=return:">'.      &return_link($r);
       &mt('Return to last resource').'</a></p>');  
     return 0;      return 0;
  }   }
     }      }
Line 341  sub release_slot { Line 343  sub release_slot {
  $r->print('<p><a href="/adm/slotrequest?command=showslots">'.   $r->print('<p><a href="/adm/slotrequest?command=showslots">'.
   &mt('Return to slot list').'</a></p>');    &mt('Return to slot list').'</a></p>');
     }      }
     if (!$inhibit_return_link) {      if (!$inhibit_return_link) { &return_link($r);  }
  $r->print('<p><a href="/adm/flip?postdata=return:">'.  
   &mt('Return to last resource').'</a></p>');  
     }  
     return 1;      return 1;
 }  }
   
Line 378  sub delete_slot { Line 377  sub delete_slot {
     }      }
     $r->print('<p><a href="/adm/slotrequest?command=showslots">'.      $r->print('<p><a href="/adm/slotrequest?command=showslots">'.
       &mt('Return to slot list').'</a></p>');        &mt('Return to slot list').'</a></p>');
     $r->print('<p><a href="/adm/flip?postdata=return:">'.      &return_link($r);
       &mt('Return to last resource').'</a></p>');  
 }  }
   
 sub return_link {  sub return_link {
Line 468  or Line 466  or
 </p>  </p>
 or  or
 STUFF  STUFF
     $r->print('<p><a href="/adm/flip?postdata=return:">'.  
       &mt('Return to last resource').'</a></p>');      &return_link($r);
     return;      return;
 }  }
   

Removed from v.1.40  
changed lines
  Added in v.1.42


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