[LON-CAPA-cvs] cvs: loncom /homework bridgetask.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Mon, 21 Nov 2005 22:42:23 -0000
albertel Mon Nov 21 17:42:23 2005 EDT
Modified files:
/loncom/homework bridgetask.pm
Log:
- better fix for the problem we saw last week with slot reservations
- use cput rather than put
Index: loncom/homework/bridgetask.pm
diff -u loncom/homework/bridgetask.pm:1.82 loncom/homework/bridgetask.pm:1.83
--- loncom/homework/bridgetask.pm:1.82 Mon Nov 21 17:28:13 2005
+++ loncom/homework/bridgetask.pm Mon Nov 21 17:42:22 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.82 2005/11/21 22:28:13 albertel Exp $
+# $Id: bridgetask.pm,v 1.83 2005/11/21 22:42:22 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -476,7 +476,8 @@
}
} elsif ($target eq 'grade' && !$env{'form.webgrade'}) {
if ($status eq 'NEEDS_CHECKIN') {
- if(&proctor_check_auth($slot_name,$slot,'Task')) {
+ if(&proctor_check_auth($slot_name,$slot,'Task')
+ && defined($Apache::inputtags::slot_name)) {
my $result=&add_to_queue('gradingqueue',
[$Apache::inputtags::slot_name]);
&Apache::lonxml::debug("add_to_queue said $result");
@@ -787,7 +788,8 @@
}
&Apache::lonhomework::showhash(%Apache::lonhomework::results);
&Apache::structuretags::finalize_storage();
- if ($award eq 'SUBMITTED') {
+ if ($award eq 'SUBMITTED'
+ && defined($Apache::inputtags::slot_name)) {
&add_to_queue('gradingqueue',[$Apache::inputtags::slot_name]);
}
} elsif ($Apache::lonhomework::results{'INTERNAL_store'}) {
@@ -1020,7 +1022,7 @@
my $cdom=$env{'course.'.$cid.'.domain'};
my %data;
$data{"$symb\0queue\0$uname\@$udom"}=$user_data;
- return &Apache::lonnet::newput($queue,\%data,$cdom,$cnum);
+ return &Apache::lonnet::cput($queue,\%data,$cdom,$cnum);
}
sub show_queue {
@@ -1245,8 +1247,8 @@
if ($todo) { return $todo; }
while (1) {
my $starttime=time;
- &Apache::lonnet::put($queue,{"$symb\0timestamp"=>$starttime},
- $cdom,$cnum);
+ &Apache::lonnet::cput($queue,{"$symb\0timestamp"=>$starttime},
+ $cdom,$cnum);
&Apache::lonxml::debug("$starttime");
my $regexp="^$symb\0queue\0";
my %queue=&Apache::lonnet::dump($queue,$cdom,$cnum,$regexp);