--- loncom/html/res/adm/pages/annotator/admannotations.pm 2007/04/24 23:26:26 1.27
+++ loncom/html/res/adm/pages/annotator/admannotations.pm 2009/02/13 20:20:20 1.33
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# This will take annotations and then plug them into a page.
#
-# $Id: admannotations.pm,v 1.27 2007/04/24 23:26:26 albertel Exp $
+# $Id: admannotations.pm,v 1.33 2009/02/13 20:20:20 schafran Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -27,6 +27,7 @@
#
##################
+
package Apache::admannotations;
use strict;
@@ -40,8 +41,7 @@ use Apache::lonlocal;
sub write_annotation {
my ($symb, $enc, $annotation) = @_;
- return if (!$annotation);
-
+ $annotation=~s/^\s*$//;
my $key = $symb;
if (!$enc) {
$key =
@@ -52,19 +52,6 @@ sub write_annotation {
return;
}
-# --------------------------------------------------------------Get annotation
-
-sub get_annotation {
- my ($symb,$enc) = @_;
-
- my $key = $symb;
- if (!$enc) {
- $key =
- &Apache::lonnet::clutter((&Apache::lonnet::decode_symb($symb))[2]);
- }
- my %annotation=&Apache::lonnet::get('nohist_annotations',[$key]);
- return $annotation{$key};
-}
# ------------------------------------------------------------Construct editor
sub js_get_symb {
@@ -115,8 +102,8 @@ ENDJS
my $end_page =
&Apache::loncommon::end_page();
- my %lt = ( 'close no save' => "Close (no save)",
- 'save' => "Save and Update",);
+ my %lt = ( 'close no save' => "Close",
+ 'save' => "Save",);
%lt = &Apache::lonlocal::texthash(%lt);
return(<