--- loncom/homework/bridgetask.pm	2006/05/23 19:55:40	1.153
+++ loncom/homework/bridgetask.pm	2006/05/25 19:39:13	1.155
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: bridgetask.pm,v 1.153 2006/05/23 19:55:40 albertel Exp $
+# $Id: bridgetask.pm,v 1.155 2006/05/25 19:39:13 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1394,20 +1394,23 @@ sub pick_from_queue_data {
 	}
 	my $end_time;
 	if (my $slot=&slotted_access($queuedata->{$key})) {
+	    &Apache::lonxml::debug("looking at slot $slot");
 	    my %slot_data=&Apache::lonnet::get_slot($slot);
 	    if ($slot_data{'endtime'} < time) { 
 		$end_time = $slot_data{'endtime'};
+	    } else {
+		&Apache::lonxml::debug("not time ".$slot_data{'endtime'});
+		next;
 	    }
 	} else {
 	    my $due_date = &Apache::lonhomework::due_date('0',$symb);
-	    if ($due_date > time) {
+	    if ($due_date < time) {
 		$end_time = $due_date;
+	    } else {
+		&Apache::lonxml::debug("not time $due_date");
+		next;
 	    }
 	}
-	if ($end_time ne '') {
-	    &Apache::lonxml::debug("not time");
-	    next;
-	}
 	
 	if (exists($queuedata->{"$key\0locked"})) {
 	    &Apache::lonxml::debug("someone already has um.");
@@ -1609,8 +1612,6 @@ sub select_user {
 		$seclist.='<input type="hidden" name="chosensections" 
                                value="'.$sec.'" />';
 	    }
-	    my $studentdis = $student;
-	    $studentdis =~ tr/:/@/;
 	    $result.=<<RESULT;
 <tr>
   <td>
@@ -1622,7 +1623,7 @@ sub select_user {
       <input type="submit" name="submit" value="Regrade" />
       $seclist
     </form>
-  <td>$fullname->{$student} <tt>($studentdis)</tt></td>
+  <td>$classlist->{$student}[&Apache::loncoursedata::CL_FULLNAME()] <tt>($student)</tt></td>
   <td>
 RESULT
         }