[LON-CAPA-cvs] cvs: loncom /homework inputtags.pm response.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Mon, 21 Nov 2005 22:45:16 -0000
albertel Mon Nov 21 17:45:16 2005 EDT
Modified files:
/loncom/homework response.pm inputtags.pm
Log:
- start of de appendixing grading queue
Index: loncom/homework/response.pm
diff -u loncom/homework/response.pm:1.129 loncom/homework/response.pm:1.130
--- loncom/homework/response.pm:1.129 Tue Nov 15 10:57:45 2005
+++ loncom/homework/response.pm Mon Nov 21 17:45:13 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# various response type definitons response definition
#
-# $Id: response.pm,v 1.129 2005/11/15 15:57:45 albertel Exp $
+# $Id: response.pm,v 1.130 2005/11/21 22:45:13 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -858,6 +858,23 @@
return 0;
}
+sub add_to_gradingqueue {
+ my ($nothing) = @_;
+
+ my %queue_info = ( 'type' => 'problem',
+ 'time' => time);
+
+ if (exists($Apache::lonhomework::history{"resource.0.checkedin.slot"})) {
+ $queue_info{'slot'}=
+ $Apache::lonhomework::history{"resource.0.checkedin.slot"};
+ }
+
+ my $result=&Apache::bridgetask::add_to_queue('gradingqueue',\%queue_info);
+ if ($result ne 'ok') {
+ &Apache::lonxml::error("add_to_queue said $result");
+ }
+}
+
# basically undef and 0 (both false) mean that they still have work to do
# and all true values mean that they can't do any more work
#
Index: loncom/homework/inputtags.pm
diff -u loncom/homework/inputtags.pm:1.183 loncom/homework/inputtags.pm:1.184
--- loncom/homework/inputtags.pm:1.183 Mon Nov 21 16:51:29 2005
+++ loncom/homework/inputtags.pm Mon Nov 21 17:45:13 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# input definitons
#
-# $Id: inputtags.pm,v 1.183 2005/11/21 21:51:29 albertel Exp $
+# $Id: inputtags.pm,v 1.184 2005/11/21 22:45:13 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -790,6 +790,9 @@
return '';
}
$Apache::lonhomework::results{"resource.$id.award"} = $award;
+ if ($award eq 'SUBMITTED') {
+ &Apache::response::add_to_gradingqueue();
+ }
}
sub grade {