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

version 1.119, 2014/02/11 19:11:24 version 1.121, 2014/09/12 15:22:58
Line 696  STUFF Line 696  STUFF
     }      }
   
     my %lt = &Apache::lonlocal::texthash(      my %lt = &Apache::lonlocal::texthash(
         'request' => 'Availibility list',          'request' => 'Availability list',
         'try'     => 'Try again?',          'try'     => 'Try again?',
         'or'      => 'or',          'or'      => 'or',
     );      );
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 2298  ENDPICK Line 2298  ENDPICK
 }  }
   
 sub csvupload_javascript_reverse_associate {  sub csvupload_javascript_reverse_associate {
     my $error1=&mt('You need to specify the name, starttime, endtime and a type');      my $error1=&mt('You need to specify the name, start time, end time and a type.');
     return(<<ENDPICK);      return(<<ENDPICK);
   function verify(vf) {    function verify(vf) {
     var foundstart=0;      var foundstart=0;
Line 2324  ENDPICK Line 2324  ENDPICK
 }  }
   
 sub csvupload_javascript_forward_associate {  sub csvupload_javascript_forward_associate {
     my $error1=&mt('You need to specify the name, starttime, endtime and a type');      my $error1=&mt('You need to specify the name, start time, end time and a type.');
   return(<<ENDPICK);    return(<<ENDPICK);
   function verify(vf) {    function verify(vf) {
     var foundstart=0;      var foundstart=0;
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.119  
changed lines
  Added in v.1.121


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