--- loncom/html/res/adm/pages/annotator/admannotations.pm 2000/10/10 07:51:11 1.8
+++ loncom/html/res/adm/pages/annotator/admannotations.pm 2000/10/10 20:30:34 1.9
@@ -28,8 +28,8 @@ sub write_annotation {
sub get_annotation {
my $urlnew=shift;
- my @annotation=Apache::lonnet::get("annotations",$urlnew);
- return @annotation;
+ my %annotation=Apache::lonnet::get("annotations",$urlnew);
+ return %annotation;
}
# ------------------------------------------------------------Construct editor
@@ -106,7 +106,7 @@ END_HTML2
sub handler {
my $r=shift;
my $page;
- my @annot_hash;
+ my %annot_hash;
my $urlold;
my $annotation;
my $urlnew;
@@ -123,11 +123,11 @@ sub handler {
$page=construct_error("Cannot annotate current window. Please point your browser to a Lon-CAPA page and then 'continue'.","continue");
} else {
if ($urlold eq $urlnew) {
- @annot_hash=($annotation);
+ $annot_hash{$urlnew}=$annotation;
} else {
- @annot_hash=get_annotation($urlnew);
+ %annot_hash=get_annotation($urlnew);
}
- $page=construct_editor($annot_hash[0],$urlnew);
+ $page=construct_editor($annot_hash{$urlnew},$urlnew);
}
} else {
$page=construct_error("Connection broken with home server. Please contact your system administrator.","try again");