Diff for /loncom/interface/slotrequest.pm between versions 1.120 and 1.121

version 1.120, 2014/02/28 19:20:06 version 1.121, 2014/09/12 15:22:58
Line 847  sub show_choices { Line 847  sub show_choices {
     if (ref($consumed_uniqueperiods) eq 'HASH') {      if (ref($consumed_uniqueperiods) eq 'HASH') {
         if (&Apache::lonnet::error(%$consumed_uniqueperiods)) {          if (&Apache::lonnet::error(%$consumed_uniqueperiods)) {
             $r->print('<span class="LC_error">'.              $r->print('<span class="LC_error">'.
                       &mt('An error occurred determining slot availability').                        &mt('An error occurred determining slot availability.').
                       '</span>');                        '</span>');
             return;              return;
         }          }
     } elsif ($consumed_uniqueperiods =~ /^error: /) {      } elsif ($consumed_uniqueperiods =~ /^error: /) {
         $r->print('<span class="LC_error">'.          $r->print('<span class="LC_error">'.
                   &mt('An error occurred determining slot availability').                    &mt('An error occurred determining slot availability.').
                   '</span>');                    '</span>');
         return;          return;
     }      }
Line 862  sub show_choices { Line 862  sub show_choices {
     my @got_slots=&check_for_reservation($symb,'allslots');      my @got_slots=&check_for_reservation($symb,'allslots');
     if ($got_slots[0] =~ /^error: /) {      if ($got_slots[0] =~ /^error: /) {
         $r->print('<span class="LC_error">'.          $r->print('<span class="LC_error">'.
                   &mt('An error occurred determining slot availability').                    &mt('An error occurred determining slot availability.').
                   '</span>');                    '</span>');
         return;          return;
     }      }
Line 877  sub show_choices { Line 877  sub show_choices {
         push(@available,$slot);          push(@available,$slot);
     }      }
     if (!@available) {      if (!@available) {
         $output = '<div class="LC_info">'.&mt('No available times.');          $output = '<span class="LC_info">'.&mt('No available times.').'</span>';
         if ($env{'form.command'} ne 'manageresv') {          if ($env{'form.command'} ne 'manageresv') {
             $output .= ' <a href="/adm/flip?postdata=return:">'.              $output .= ' <a href="/adm/flip?postdata=return:">'.
                        &mt('Return to last resource').'</a>';                         &mt('Return to last resource').'</a>';
         }          }
         $output .= '</div>';  
         $r->print($output);          $r->print($output);
         return;          return;
     }      }
Line 958  STUFF Line 957  STUFF
        $output .= &Apache::loncommon::end_data_table();         $output .= &Apache::loncommon::end_data_table();
     }      }
     $r->print($output);      $r->print($output);
       return;
 }  }
   
 sub to_show {  sub to_show {
Line 2683  sub handler { Line 2683  sub handler {
     return OK;      return OK;
  }   }
  if ($env{'form.requestattempt'}) {   if ($env{'form.requestattempt'}) {
               $r->print('<div class="LC_left_float">'); 
     &show_choices($r,$symb);      &show_choices($r,$symb);
               $r->print('</div><div style="padding:0;clear:both;margin:0;border:0"></div>');
  } elsif ($env{'form.command'} eq 'release') {   } elsif ($env{'form.command'} eq 'release') {
     &release_slot($r,$symb);      &release_slot($r,$symb);
  } elsif ($env{'form.command'} eq 'get') {   } elsif ($env{'form.command'} eq 'get') {

Removed from v.1.120  
changed lines
  Added in v.1.121


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