--- loncom/homework/bridgetask.pm	2012/01/03 00:28:17	1.258
+++ loncom/homework/bridgetask.pm	2013/07/15 16:13:12	1.262
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: bridgetask.pm,v 1.258 2012/01/03 00:28:17 raeburn Exp $
+# $Id: bridgetask.pm,v 1.262 2013/07/15 16:13:12 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -719,7 +719,15 @@ sub start_Task {
 					  'slot' => $slot_name});
 	    ($version,$previous)=&get_version();
 	}
-	
+        if (($target eq 'web') && ($version ne '') && ($slot_name ne '')) {
+            if (ref($slot) eq 'HASH') {
+                if ($slot->{'endtime'} > time()) {
+                    $result .=
+                        &Apache::lonhtmlcommon::set_due_date($slot->{'endtime'});
+                }
+            }
+	}
+
 	my $status_id = 'LC_task_take';
         if ($previous && $target eq 'answer') {
             $status_id = 'LC_task_answer';
@@ -743,22 +751,22 @@ sub start_Task {
 		}
 		my $msg;
 		if ($status eq 'UNAVAILABLE') {
-		    $msg.='<h1>'.&mt('Unable to determine if this resource is open due to network problems. Please try again later.').'</h1>';
+		    $msg.='<p class="LC_error">'.&mt('Unable to determine if this resource is open due to network problems. Please try again later.').'</p>';
 		} elsif ($status eq 'NOT_IN_A_SLOT') {
-		    $msg.='<h1>'.&mt('You are not currently signed up to work at this time and/or place.').'</h1>';
+		    $msg.='<p class="LC_warning">'.&mt('You are not currently signed up to work at this time and/or place.').'</p>';
 		    $msg.=&add_request_another_attempt_button("Sign up for time to work");
 		} elsif ($status eq 'NEEDS_CHECKIN') {
-		    $msg.='<h1>'.&mt('You need the Proctor to validate you.').
-			'</h1>'.&proctor_validation_screen($slot);
+		    $msg.='<p class="LC_warning">'.&mt('You need the Proctor to validate you.').
+			'</p>'.&proctor_validation_screen($slot);
 		} elsif ($status eq 'WAITING_FOR_GRADE') {
-		    $msg.='<h1>'.&mt('Your submission is in the grading queue.').'</h1>';
+		    $msg.='<p class="LC_info">'.&mt('Your submission is in the grading queue.').'</p>';
 		} elsif ($env{'form.donescreen'}) {
 		    $result .= &done_screen($version);
 		} elsif ($status eq 'NOT_YET_VIEWED') {
                     my $symb=&Apache::lonnet::symbread();
                     $msg.=&Apache::structuretags::firstaccess_msg($accessmsg,$symb);
 		} else {
-		    $msg.='<h1>'.&mt('Not open to be viewed').'</h1>';
+		    $msg.='<p class="LC_warning">'.&mt('Not open to be viewed').'</p>';
 		}
 		if ($status eq 'CLOSED' || $status eq 'INVALID_ACCESS') {
 		    $msg.='The problem '.$accessmsg;
@@ -988,7 +996,7 @@ sub get_key_todo {
 	    my $classlist=&get_limited_classlist();
 	    if (!&allow_grade_user($classlist->{$uname.':'.$udom})) {
 		return (undef,'not_allowed',
-			&mt('Requested student ([_1]) is in a section you aren\'t allowed to grade.',$uname.':'.$udom));
+			&mt("Requested student ([_1]) is in a section you aren't allowed to grade.",$uname.':'.$udom));
 	    }
 	}
 	my $gradingkey=&encode_queue_key($symb,$udom,$uname);
@@ -1788,7 +1796,7 @@ sub show_queue {
 		    $result.=(<<FORM);
 <td>$status</td>
 <td>
-<form style="display: inline" method="post">
+<form style="display: inline" method="post" action="">
  <input type="hidden" name="gradingkey" value="$ekey" />
  <input type="hidden" name="queue" value="$queue" />
  <input type="hidden" name="gradingaction" value="$action" />
@@ -2207,7 +2215,7 @@ sub select_user {
 	    $result.=&Apache::loncommon::start_data_table_row();
 	    $result.=<<RESULT;
   <td>
-    <form style="display: inline" method="post">
+    <form style="display: inline" method="post" action="">
       <input type="hidden" name="gradingkey" value="$todo" />
       <input type="hidden" name="queue" value="$queue" />
       <input type="hidden" name="webgrade" value="no" />