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

version 1.130, 2015/09/27 22:35:39 version 1.131, 2015/10/05 02:35:45
Line 1494  sub show_table { Line 1494  sub show_table {
      'allowedusers'    => 'Users slot is restricted to.',       'allowedusers'    => 'Users slot is restricted to.',
      'uniqueperiod'    => 'Period of time slot is unique',       'uniqueperiod'    => 'Period of time slot is unique',
      'scheduled'       => 'Scheduled Students',       'scheduled'       => 'Scheduled Students',
      'proctor'         => 'List of proctors');       'proctor'         => 'List of proctors',
        'iptied'          => 'Unique IP each student',);
     if ($crstype eq 'Community') {      if ($crstype eq 'Community') {
         $show_fields{'startreserve'} = &mt('Time members can start reserving');          $show_fields{'startreserve'} = &mt('Time members can start reserving');
         $show_fields{'endreserve'} = &mt('Time members can no longer reserve');          $show_fields{'endreserve'} = &mt('Time members can no longer reserve');
Line 1502  sub show_table { Line 1503  sub show_table {
     }      }
     my @show_order=('name','description','type','starttime','endtime',      my @show_order=('name','description','type','starttime','endtime',
     'startreserve','endreserve','reservationmsg','secret','space',      'startreserve','endreserve','reservationmsg','secret','space',
     'ip','symb','allowedsections','allowedusers','uniqueperiod',      'ip','iptied','symb','allowedsections','allowedusers','uniqueperiod',
     'scheduled','proctor');      'scheduled','proctor');
     my @show =       my @show = 
  (exists($env{'form.show'})) ? &Apache::loncommon::get_env_multiple('form.show')   (exists($env{'form.show'})) ? &Apache::loncommon::get_env_multiple('form.show')
Line 1834  LOGLINK Line 1835  LOGLINK
  if (exists($show{'ip'})) {   if (exists($show{'ip'})) {
     $colspan++;$r->print("<td>$slots{$slot}{'ip'}</td>\n");      $colspan++;$r->print("<td>$slots{$slot}{'ip'}</td>\n");
  }   }
           if (exists($show{'iptied'})) {
               $colspan++;
               if ($slots{$slot}{'iptied'} eq 'yes') {
                   $r->print('<td>'.&mt('Yes')."</td>\n");
               } elsif ($slots{$slot}{'iptied'} eq 'answer') {
                   $r->print('<td>'.&mt('Yes, including post-answer date')."</td>\n");
               } else {
                   $r->print('<td>'.&mt('No')."</td>\n");
               }
           }
  if (exists($show{'symb'})) {   if (exists($show{'symb'})) {
     $colspan++;$r->print("<td>".join('<br />',@titles)."</td>\n");      $colspan++;$r->print("<td>".join('<br />',@titles)."</td>\n");
  }   }
Line 2952  sub csvupload_fields { Line 2963  sub csvupload_fields {
             ['endreserve','Reservation End Time'],              ['endreserve','Reservation End Time'],
             ['reservationmsg','Message when reservation changed'],              ['reservationmsg','Message when reservation changed'],
     ['ip','IP or DNS restriction'],      ['ip','IP or DNS restriction'],
               ['iptied','Unique IP each student'],
     ['proctor','List of proctor ids'],      ['proctor','List of proctor ids'],
     ['description','Slot Description'],      ['description','Slot Description'],
     ['maxspace','Maximum number of reservations'],      ['maxspace','Maximum number of reservations'],
Line 3062  sub csv_upload_assign { Line 3074  sub csv_upload_assign {
  $slot{$key}=$entries{$fields{$key}};   $slot{$key}=$entries{$fields{$key}};
     }      }
  }   }
           if ($entries{$fields{'iptied'}} =~ /^\s*(yes|1)\s*$/i) {
               $slot{'iptied'}='yes'; 
           } elsif ($entries{$fields{'iptied'}} =~ /^\s*answer\s*$/i) {
               $slot{'iptied'}='answer';
           }
         if ($entries{$fields{'allowedusers'}}) {          if ($entries{$fields{'allowedusers'}}) {
             $entries{$fields{'allowedusers'}} =~ s/^\s+//;              $entries{$fields{'allowedusers'}} =~ s/^\s+//;
             $entries{$fields{'allowedusers'}} =~ s/\s+$//;              $entries{$fields{'allowedusers'}} =~ s/\s+$//;
Line 3284  sub handler { Line 3301  sub handler {
  my ($status) = &Apache::lonhomework::check_slot_access('0',$type);   my ($status) = &Apache::lonhomework::check_slot_access('0',$type);
  if ($status eq 'CAN_ANSWER' ||   if ($status eq 'CAN_ANSWER' ||
     $status eq 'NEEDS_CHECKIN' ||      $status eq 'NEEDS_CHECKIN' ||
     $status eq 'WAITING_FOR_GRADE') {      $status eq 'WAITING_FOR_GRADE' ||
               $status eq 'NEED_DIFFERENT_IP') {
     &fail($r,'not_allowed');      &fail($r,'not_allowed');
     return OK;      return OK;
  }   }

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


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