--- loncom/html/res/adm/pages/annotator/admannotations.pm 2001/12/19 17:17:46 1.17
+++ loncom/html/res/adm/pages/annotator/admannotations.pm 2005/04/07 06:56:22 1.19
@@ -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.17 2001/12/19 17:17:46 albertel Exp $
+# $Id: admannotations.pm,v 1.19 2005/04/07 06:56:22 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -25,18 +25,13 @@
#
# http://www.lon-capa.org/
#
-# 08/25/00 Ben Tyszka
-#
-# 10/17,10/18,10/20 Gerd Kortemeyer
-#
-#
##################
package Apache::admannotations;
use strict;
use Apache::Constants qw(:common);
-use Apache::lonnet();
+use Apache::lonnet;
# --------------------------------------------------------------Put annotation
@@ -144,18 +139,20 @@ sub handler {
my $page;
my %annot_hash;
- my $urlold=$ENV{'form.urlold'};
+ my $urlold=$env{'form.urlold'};
$urlold=~s/^http\:\/\///;
$urlold=~s/^[^\/]+//;
- my $urlnew=$ENV{'form.urlnew'};
+ $urlold=~s/\?.*$//;
+ my $urlnew=$env{'form.urlnew'};
$urlnew=~s/^http\:\/\///;
$urlnew=~s/^[^\/]+//;
- my $annotation=$ENV{'form.annotation'};
+ $urlnew=~s/\?.*$//;
+ my $annotation=$env{'form.annotation'};
if ($urlold) {
write_annotation($urlold,$annotation);
}
- if (exists($ENV{'form.urlnew'})) {
+ if (exists($env{'form.urlnew'})) {
unless ($urlnew) {
$page=construct_error("Cannot annotate current window. Please point your browser to a LON-CAPA page and then 'continue'.","continue");
} else {
@@ -164,7 +161,7 @@ sub handler {
} else {
%annot_hash=get_annotation($urlnew);
}
- $page=construct_editor($annot_hash{$urlnew},$ENV{'form.urlnew'});
+ $page=construct_editor($annot_hash{$urlnew},$env{'form.urlnew'});
}
}
$r->print($page);