Diff for /loncom/auth/blockedaccess.pm between versions 1.2 and 1.4

version 1.2, 2006/12/11 18:59:21 version 1.4, 2012/03/31 23:10:47
Line 1 Line 1
 # The LearningOnline Network  # The LearningOnline Network
 # Information about blocking status for Portfolio files  # Information about blocking status for Portfolio files
 #  #
   # $Id$
   #
 # Copyright Michigan State University Board of Trustees  # Copyright Michigan State University Board of Trustees
 #  #
 # This file is part of the LearningOnline Network with CAPA (LON-CAPA).  # This file is part of the LearningOnline Network with CAPA (LON-CAPA).
Line 34  use Apache::lonlocal; Line 36  use Apache::lonlocal;
   
 sub handler {  sub handler {
     my $r = shift;      my $r = shift;
     my $origurl = $r->uri;  
     my ($type,$udom,$uname,$file_name,$group) =   
  &Apache::lonnet::parse_portfolio_url($origurl);  
     &Apache::loncommon::content_type($r,'text/html');      &Apache::loncommon::content_type($r,'text/html');
     $r->send_http_header;      $r->send_http_header;
     return OK if $r->header_only;      return OK if $r->header_only;
   
     &Apache::lonlocal::get_language_handle($r);      &Apache::lonlocal::get_language_handle($r);
     my ($blocked,$blocktext) =       my $origurl = $r->uri;
         &Apache::loncommon::blocking_status('port',$uname,$udom);      my ($blocked,$blocktext);
   
       if (&Apache::lonnet::is_portfolio_url($origurl)) {
           my ($type,$udom,$uname,$file_name,$group) = 
       &Apache::lonnet::parse_portfolio_url($origurl);
           ($blocked,$blocktext) = 
               &Apache::loncommon::blocking_status('port',$uname,$udom);
       } else {
           if ($env{'request.course.id'}) {
               my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'};
               my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};
               ($blocked,$blocktext) =
                   &Apache::loncommon::blocking_status('docs',$cnum,$cdom,$origurl);
           }
       }
     if ($blocked) {      if ($blocked) {
         $r->print(&Apache::loncommon::start_page('Access Temporarily Blocked'));          $r->print(&Apache::loncommon::start_page('Access Temporarily Blocked'));
         $r->print($blocktext);          $r->print($blocktext);

Removed from v.1.2  
changed lines
  Added in v.1.4


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