@@ -166,6 +175,27 @@ $end_page
END_HTML2
}
+sub block_check {
+ my ($clientip) = @_;
+ my ($blocked,$blocktext) =
+ &Apache::loncommon::blocking_status('annotate',$clientip);
+ if ($blocked) {
+ my %lt = &Apache::lonlocal::texthash(
+ 'close' => 'Close',
+ );
+ my $start_page =
+ &Apache::loncommon::start_page('Annotations',undef,
+ {'only_body' => 1,});
+ my $end_page = ''."\n".
+ &Apache::loncommon::end_page();
+ return ($blocked,$start_page.$blocktext.$end_page);
+ } else {
+ return ();
+ }
+}
# ---------------------------------------------------------------Main Handler
@@ -176,6 +206,14 @@ sub handler {
$r->send_http_header;
return OK if $r->header_only;
+ my $clientip = &Apache::lonnet::get_requestor_ip($r);
+ if ($clientip ne '') {
+ my ($blocked,$output) = &block_check($clientip);
+ if ($blocked) {
+ $r->print($output);
+ return OK;
+ }
+ }
my $page;
|