--- loncom/interface/lonhtmlcommon.pm	2006/08/04 21:01:52	1.149
+++ loncom/interface/lonhtmlcommon.pm	2006/08/08 19:10:54	1.152
@@ -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.152 2006/08/08 19:10:54 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -689,14 +689,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 +699,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 Enrolled')],
+		      ['Future',  &mt('Future Enrollment')],
+		      ['Expired', &mt('Previously Enrolled')],
+		      ['Any',     &mt('Any Enrollment 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 +996,7 @@ sub crumbs {
 	foreach my $dir (split('/',$uri)) {
             if (! $dir) { next; }
             $path .= $dir;
-
+	    if ($path eq $uri) {
 		if ($skiplast) {
 		    $output.=$dir;
                     last;