--- loncom/interface/lonhtmlcommon.pm	2006/08/04 21:01:52	1.149
+++ loncom/interface/lonhtmlcommon.pm	2006/12/05 02:55:53	1.155
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common html routines
 #
-# $Id: lonhtmlcommon.pm,v 1.149 2006/08/04 21:01:52 albertel Exp $
+# $Id: lonhtmlcommon.pm,v 1.155 2006/12/05 02:55:53 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -60,7 +60,6 @@ use Time::Local;
 use Time::HiRes;
 use Apache::lonlocal;
 use Apache::lonnet;
-use lib '/home/httpd/lib/perl/';
 use LONCAPA;
 
 ##############################################
@@ -78,7 +77,7 @@ use LONCAPA;
 sub authorbombs {
     my $url=shift;
     $url=&Apache::lonnet::declutter($url);
-    my ($udom,$uname)=($url=~/^(\w+)\/(\w+)\//);
+    my ($udom,$uname)=($url=~m{^($LONCAPA::domain_re)/($LONCAPA::username_re)/});
     my %bombs=&Apache::lonmsg::all_url_author_res_msg($uname,$udom);
     foreach (keys %bombs) {
 	if ($_=~/^$udom\/$uname\//) {
@@ -689,14 +688,6 @@ sub StatusOptions {
         $status = $env{'form.Status'} if (exists($env{'form.Status'}));
     }
 
-    my $OpSel1 = '';
-    my $OpSel2 = '';
-    my $OpSel3 = '';
-
-    if($status eq 'Any')         { $OpSel3 = ' selected'; }
-    elsif($status eq 'Expired' ) { $OpSel2 = ' selected'; }
-    else                         { $OpSel1 = ' selected'; }
-
     my $Str = '';
     $Str .= '<select name="Status"';
     if(defined($formName) && $formName ne '' && ! defined($onchange)) {
@@ -707,12 +698,18 @@ sub StatusOptions {
     }
     $Str .= ' size="'.$size.'" ';
     $Str .= '>'."\n";
-    $Str .= '<option value="Active" '.$OpSel1.'>'.
-        &mt('Currently Enrolled').'</option>'."\n";
-    $Str .= '<option value="Expired" '.$OpSel2.'>'.
-        &mt('Previously Enrolled').'</option>'."\n";
-    $Str .= '<option value="Any" '.$OpSel3.'>'.
-        &mt('Any Enrollment Status').'</option>'."\n";
+    foreach my $type (['Active',  &mt('Currently Has Access')],
+		      ['Future',  &mt('Will Have Future Access')],
+		      ['Expired', &mt('Previously Had Access')],
+		      ['Any',     &mt('Any Access Status')]) {
+	my ($name,$label) = @$type;
+	$Str .= '<option value="'.$name.'" ';
+	if ($status eq $name) {
+	    $Str .= 'selected="selected" ';
+	}
+	$Str .= '>'.$label.'</option>'."\n";
+    }
+
     $Str .= '</select>'."\n";
 }
 
@@ -998,7 +995,7 @@ sub crumbs {
 	foreach my $dir (split('/',$uri)) {
             if (! $dir) { next; }
             $path .= $dir;
-
+	    if ($path eq $uri) {
 		if ($skiplast) {
 		    $output.=$dir;
                     last;
@@ -1048,7 +1045,7 @@ var checkwin;
 function spellcheckerwindow(string) {
     var esc_string = string.replace(/\"/g,'&quot;');
     checkwin=window.open($nothing,'spellcheckwin','height=320,width=280,resizable=yes,scrollbars=yes,location=no,menubar=no,toolbar=no');
-    checkwin.document.writeln('$start_page<form name="spellcheckform" action="/adm/spellcheck" method="post"><input type="hidden" name="text" value="'+esc_string+'" /><\/form>$end_page');
+    checkwin.document.writeln('$start_page<form name="spellcheckform" action="/adm/spellcheck" method="post"><input type="hidden" name="text" value="'+esc_string+'" /><\\/form>$end_page');
     checkwin.document.close();
 }
 // END LON-CAPA Internal -->