Diff for /loncom/interface/lonmanagekeys.pm between versions 1.13 and 1.14

version 1.13, 2003/09/23 00:26:10 version 1.14, 2004/05/08 02:07:16
Line 191  sub handler { Line 191  sub handler {
         return HTTP_NOT_ACCEPTABLE;           return HTTP_NOT_ACCEPTABLE; 
     }      }
     if ($ENV{'form.cid'}) {      if ($ENV{'form.cid'}) {
         my %cenv=&Apache::lonnet::coursedescription($ENV{'form.cid'});   my %cenv=&Apache::lonnet::coursedescription($ENV{'form.cid'});
  if ($ENV{'form.listkeyscsv'}) {   my $keytype='';
    if ($cenv{'url'} eq '/res/') {
       ($cenv{'num'},$cenv{'domain'})=split(/\_/,$ENV{'form.cid'});
       $keytype='auth';
    } elsif ($cenv{'keyauth'}) {
       ($cenv{'num'},$cenv{'domain'})=split(/\W/,$cenv{'keyauth'});
       $keytype='auth';
    } else {
       $keytype='course';
    }
     if ($ENV{'form.listkeyscsv'}) {
 #  #
 # CSV Output  # CSV Output
 #  #
Line 233  sub handler { Line 243  sub handler {
  &addcom(%cenv);   &addcom(%cenv);
             }              }
 # --- Menu  # --- Menu
     $r->print('<h3>'.&mt('Key Access').'</h3>');      if ($keytype eq 'course') {
     if ($cenv{'keyaccess'} eq 'yes') {   $r->print('<h3>'.&mt('Key Access').'</h3>');
  $r->print(&mt('Access to this course is key controlled.').   if ($cenv{'keyaccess'} eq 'yes') {
       $r->print(&mt('Access to this course is key controlled.').
 '<br /><input type="submit" name="toggle" value="'.&mt('Open Access').'" />')  '<br /><input type="submit" name="toggle" value="'.&mt('Open Access').'" />')
  } else {   } else {
     $r->print(&mt('Access to this course is open, no access keys').'<br /><input type="submit" name="toggle" value="'.&mt('Control Access').'" />');      $r->print(&mt('Access to this course is open, no access keys').'<br /><input type="submit" name="toggle" value="'.&mt('Control Access').'" />');
    }
       } else {
    $r->print('<h3>'.&mt('Key Authority').
     ' <tt>'.$cenv{'num'}.'@'.$cenv{'domain'}.'</tt></h3>');
     }      }
     $r->print(<<ENDKEYMENU);      $r->print(<<ENDKEYMENU);
 <hr /><h3>Generate New Keys</h3>  <hr /><h3>Generate New Keys</h3>
Line 261  ENDKEYMENU Line 276  ENDKEYMENU
  $r->send_http_header;   $r->send_http_header;
  $r->print(&header().&Apache::loncommon::coursebrowser_javascript());   $r->print(&header().&Apache::loncommon::coursebrowser_javascript());
         $r->print(          $r->print(
    &mt('Course ID').': <input input type="text" size="25" name="course" value="" />');     &mt('Course ID of Key Authority').': <input input type="text" size="25" name="course" value="" />');
         $r->print(&mt('Domain').': '.&Apache::loncommon::select_dom_form(          $r->print(&mt('Domain').': '.&Apache::loncommon::select_dom_form(
                $ENV{'request.role.domain'},'domain'));                 $ENV{'request.role.domain'},'domain'));
         $r->print(&Apache::loncommon::selectcourse_link(          $r->print(&Apache::loncommon::selectcourse_link(

Removed from v.1.13  
changed lines
  Added in v.1.14


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