[LON-CAPA-cvs] cvs: loncom /homework bridgetask.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Tue, 31 May 2005 16:31:03 -0000
albertel Tue May 31 12:31:03 2005 EDT
Modified files:
/loncom/homework bridgetask.pm
Log:
- don't allow graders to pick a resource that isn't ready for grading
Index: loncom/homework/bridgetask.pm
diff -u loncom/homework/bridgetask.pm:1.34 loncom/homework/bridgetask.pm:1.35
--- loncom/homework/bridgetask.pm:1.34 Tue May 31 12:27:43 2005
+++ loncom/homework/bridgetask.pm Tue May 31 12:31:01 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: bridgetask.pm,v 1.34 2005/05/31 16:27:43 albertel Exp $
+# $Id: bridgetask.pm,v 1.35 2005/05/31 16:31:01 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -661,6 +661,8 @@
my ($symb,$uname,$udom) = &decode_queue_key($key);
my $title=&Apache::lonnet::gettitle($symb);
$result.="<tr>";
+ my $slot=$queue{$key}->[0];
+ my %slot_data=&Apache::lonnet::get_slot($slot);
if ($with_selects) {
my $ekey=&Apache::lonnet::escape($key);
my ($action,$description)=('select',&mt('Select'));
@@ -672,7 +674,8 @@
($action,$description)=('unlock',&mt('Unlock'));
}
}
- $result.=(<<FORM);
+ if (time > $slot_data{'endtime'}) {
+ $result.=(<<FORM);
<td>
<form method="POST">
<input type="hidden" name="gradingkey" value="$ekey" />
@@ -684,10 +687,12 @@
</form>
</td>
FORM
+
+ } else {
+ $result.='<td>'.&mt("In Progress").'</td>'
+ }
}
$result.="<td>$title</td><td>$uname</td>";
- my $slot=$queue{$key}->[0];
- my %slot_data=&Apache::lonnet::get_slot($slot);
$result.='<td>queue entry</td><td>Slot: '.$slot.' End time: '.
&Apache::lonlocal::locallocaltime($slot_data{'endtime'}).
"</td></tr>";