@@ -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,11 +206,19 @@ 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;
- my ($symb_old,$symb_old_enc) = &Apache::loncommon::clean_symb($env{'form.symbold'});
- my ($symb_new,$symb_new_enc) = &Apache::loncommon::clean_symb($env{'form.symbnew'});
+ my ($symb_old,$symb_old_enc) = &Apache::loncommon::clean_symb($env{'form.symbold'},1);
+ my ($symb_new,$symb_new_enc) = &Apache::loncommon::clean_symb($env{'form.symbnew'},1);
my $annotation=$env{'form.annotation'};
@@ -205,3 +243,41 @@ sub handler {
1;
__END__
+=pod
+
+=head1 NAME
+
+Apache::admannotations
+
+=head1 SYNOPSIS
+
+This will take annotations and then plug them into a page.
+
+This is part of the LearningOnline Network with CAPA project
+described at http://www.lon-capa.org.
+
+=head1 OVERVIEW
+
+(empty)
+
+=head1 SUBROUTINES
+
+=over write_annotation()
+
+Put annotation
+
+=item js_get_symb()
+
+Construct editor
+
+=item construct_editor()
+
+=item construct_error()
+
+=item handler()
+
+=back
+
+=cut
+
+
|