[LON-CAPA-cvs] cvs: loncom /homework lonhomework.pm

albertel lon-capa-cvs@mail.lon-capa.org
Sat, 04 Jun 2005 07:47:52 -0000


albertel		Sat Jun  4 03:47:52 2005 EDT

  Modified files:              
    /loncom/homework	lonhomework.pm 
  Log:
  - check student reserved slots
  
  
Index: loncom/homework/lonhomework.pm
diff -u loncom/homework/lonhomework.pm:1.209 loncom/homework/lonhomework.pm:1.210
--- loncom/homework/lonhomework.pm:1.209	Fri May 20 14:07:29 2005
+++ loncom/homework/lonhomework.pm	Sat Jun  4 03:47:51 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Homework handler
 #
-# $Id: lonhomework.pm,v 1.209 2005/05/20 18:07:29 albertel Exp $
+# $Id: lonhomework.pm,v 1.210 2005/06/04 07:47:51 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -247,13 +247,16 @@
 	return ('SHOW_ANSWER');
     }
     my ($id)=@_;
-    my @slots=split(':',&Apache::lonnet::EXT("resource.$id.available"));
+    my @slots=
+	(split(':',&Apache::lonnet::EXT("resource.$id.availablestudent")),
+	 split(':',&Apache::lonnet::EXT("resource.$id.available")));
+
 #    if (!@slots) {
 #	return ($status,$datemsg);
 #    }
     my $slotstatus='NOT_IN_A_SLOT';
     my ($returned_slot,$slot_name);
-    foreach my $slot (sort(@slots)) {
+    foreach my $slot (@slots) {
 	&Apache::lonxml::debug("getting $slot");
 	my %slot=&Apache::lonnet::get_slot($slot);
 	&Apache::lonhomework::showhash(%slot);