--- doc/homework/worktime.html 2004/05/07 21:34:26 1.2 +++ doc/homework/worktime.html 2005/04/07 06:56:20 1.4 @@ -19,15 +19,18 @@

Conf Changes

-<Location /adm/username> -SetHandler perl-script -PerlHandler Apache::username -</Location> -<LocationMatch "\.username$"> -SetHandler perl-script -PerlHandler Apache::username -</LocationMatch> + +<Location /adm/username>
+PerlAccessHandler Apache::lonacc
+SetHandler perl-script
+PerlHandler Apache::username
+</Location>
+ +<LocationMatch "\.username$">
+SetHandler perl-script
+PerlHandler Apache::username
+</LocationMatch>

Example 1

@@ -55,7 +58,7 @@ sub handler {
 	$r->content_type('text/html');
 	$r->send_http_header;
 	return OK if $r->header_only;
-	$r->print("The username handler is in use by $ENV{'user.name'}");
+	$r->print("The username handler is in use by $env{'user.name'}");
 	return OK;
 }
 1;
@@ -72,7 +75,7 @@ sub handler {
 	$r->content_type('text/html');
 	$r->send_http_header;
 	return OK if $r->header_only;
-	$r->print("The username handler is in use by $ENV{'user.name'} looking for "
+	$r->print("The username handler is in use by $env{'user.name'} looking for "
                      .$r->uri."<br>");
 	my $file=&Apache::lonnet::filelocation("",$r->uri);
 	my $contents=&Apache::lonnet::getfile($file);
@@ -93,7 +96,7 @@ sub handler {
 	$r->content_type('text/html');
 	$r->send_http_header;
 	return OK if $r->header_only;
-	$r->print("The username handler is in use by $ENV{'user.name'} looking for "
+	$r->print("The username handler is in use by $env{'user.name'} looking for "
                    .$r->uri."<br>");
 	my $file=&Apache::lonnet::filelocation("",$r->uri);
 	my $contents=&Apache::lonnet::getfile($file);
@@ -115,7 +118,7 @@ sub handler {
         $r->content_type('text/html');
         $r->send_http_header;
         return OK if $r->header_only;
-        $r->print("The username handler is in use by $ENV{'user.name'} looking for "
+        $r->print("The username handler is in use by $env{'user.name'} looking for "
                    .$r->uri."<br>");
         my $file=&Apache::lonnet::filelocation("",$r->uri);
         my $contents=&Apache::lonnet::getfile($file);
@@ -128,9 +131,9 @@ sub handler {
         } else {
                 $r->print("<br>Last time you said $hash{'info'}");
         }
-        if ($ENV{'form.info'}) {
-                $r->print("<br>Now you say $ENV{'form.info'}");
-                $hash{'info'}=$ENV{'form.info'};
+        if ($env{'form.info'}) {
+                $r->print("<br>Now you say $env{'form.info'}");
+                $hash{'info'}=$env{'form.info'};
                 &Apache::lonnet::put('username',%hash);
         }
         return OK;