Diff for /loncom/interface/slotrequest.pm between versions 1.27 and 1.28

version 1.27, 2005/10/27 15:11:03 version 1.28, 2005/11/02 22:46:12
Line 53  sub fail { Line 53  sub fail {
 }  }
   
 sub start_page {  sub start_page {
     my ($r)=@_;      my ($r,$title)=@_;
     my $html=&Apache::lonxml::xmlbegin();      my $html=&Apache::lonxml::xmlbegin();
     $r->print($html.'<head><title>'.      $r->print($html.'<head><title>'.&mt($title).'</title></head>');
       &mt('Request another Worktime').'</title></head>');      $r->print(&Apache::loncommon::bodytag($title));
     $r->print(&Apache::loncommon::bodytag('Requesting another Worktime'));  
 }  }
   
 sub end_page {  sub end_page {
Line 465  sub show_table { Line 464  sub show_table {
 <input type="hidden" name="command" value="uploadstart" />  <input type="hidden" name="command" value="uploadstart" />
 <input type="submit" name="start" value="'.&mt('Upload Slot List').'" />  <input type="submit" name="start" value="'.&mt('Upload Slot List').'" />
 </form>');  </form>');
    $r->print('<form method="POST" action="/adm/helper/newslot.helper">
   <input type="submit" name="newslot" value="'.&mt('Create a New Slot').'" />
   </form>');
     }      }
     my $linkstart='<a href="/adm/slotrequest?command=showslots&amp;order=';      my $linkstart='<a href="/adm/slotrequest?command=showslots&amp;order=';
     $r->print('<table border="1">      $r->print('<table border="1">
Line 525  sub show_table { Line 527  sub show_table {
    &Apache::lonlocal::locallocaltime($slots{$slot}->{'starttime'}):'');     &Apache::lonlocal::locallocaltime($slots{$slot}->{'starttime'}):'');
  my $end=($slots{$slot}->{'endtime'}?   my $end=($slots{$slot}->{'endtime'}?
  &Apache::lonlocal::locallocaltime($slots{$slot}->{'endtime'}):'');   &Apache::lonlocal::locallocaltime($slots{$slot}->{'endtime'}):'');
  my $start_reserve=($slots{$slot}->{'endtime'}?   my $start_reserve=($slots{$slot}->{'startreserve'}?
    &Apache::lonlocal::locallocaltime($slots{$slot}->{'startreserve'}):'');     &Apache::lonlocal::locallocaltime($slots{$slot}->{'startreserve'}):'');
   
  my $unique;   my $unique;
Line 543  sub show_table { Line 545  sub show_table {
  $name_cache{$_} = $fullname;   $name_cache{$_} = $fullname;
     }      }
     &Apache::loncommon::aboutmewrapper($fullname,$uname,$udom);      &Apache::loncommon::aboutmewrapper($fullname,$uname,$udom);
  } (split(/\s*,\s*/,$slots{$slot}->{'proctor'}));   } (sort(split(/\s*,\s*/,$slots{$slot}->{'proctor'})));
   
  my $proctors=join(', ',@proctors);   my $proctors=join(', ',@proctors);
   
Line 805  sub handler { Line 807  sub handler {
     my $r=shift;      my $r=shift;
   
     &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'});      &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'});
     &start_page($r);      
     my $vgr=&Apache::lonnet::allowed('vgr',$env{'request.course.id'});      my $vgr=&Apache::lonnet::allowed('vgr',$env{'request.course.id'});
     my $mgr=&Apache::lonnet::allowed('mgr',$env{'request.course.id'});      my $mgr=&Apache::lonnet::allowed('mgr',$env{'request.course.id'});
       my $title='Requesting Another Worktime';
       if ($env{'form.command'} =~ /^(showslots|uploadstart|csvuploadmap|csvuploadassign)$/ && $vgr eq 'F') {
    $title = 'Managing Slots';
       }
       &start_page($r,$title);
   
     if ($env{'form.command'} eq 'showslots' && $vgr eq 'F') {      if ($env{'form.command'} eq 'showslots' && $vgr eq 'F') {
  &show_table($r,$mgr);   &show_table($r,$mgr);
     } elsif ($env{'form.command'} eq 'uploadstart' && $mgr eq 'F') {      } elsif ($env{'form.command'} eq 'uploadstart' && $mgr eq 'F') {
Line 825  sub handler { Line 833  sub handler {
     }      }
     &csv_upload_map($r);      &csv_upload_map($r);
  }   }
     } elsif ($env{'form.command'} eq 'editslot' && $mgr eq 'F') {  
  &show_slot_edit($r);  
     } else {      } else {
  my $symb=&Apache::lonnet::unescape($env{'form.symb'});   my $symb=&Apache::lonnet::unescape($env{'form.symb'});
  my (undef,undef,$res)=&Apache::lonnet::decode_symb($symb);   my (undef,undef,$res)=&Apache::lonnet::decode_symb($symb);

Removed from v.1.27  
changed lines
  Added in v.1.28


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