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

albertel lon-capa-cvs@mail.lon-capa.org
Wed, 21 Dec 2005 17:53:25 -0000


albertel		Wed Dec 21 12:53:25 2005 EDT

  Modified files:              
    /loncom/homework	lonhomework.pm 
  Log:
  - BT .0. updates
  
  
Index: loncom/homework/lonhomework.pm
diff -u loncom/homework/lonhomework.pm:1.229 loncom/homework/lonhomework.pm:1.230
--- loncom/homework/lonhomework.pm:1.229	Thu Dec 15 18:27:22 2005
+++ loncom/homework/lonhomework.pm	Wed Dec 21 12:53:25 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Homework handler
 #
-# $Id: lonhomework.pm,v 1.229 2005/12/15 23:27:22 albertel Exp $
+# $Id: lonhomework.pm,v 1.230 2005/12/21 17:53:25 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -171,8 +171,8 @@
     
     my $key;
     if ($type eq 'Task') {
-	my $version=$Apache::lonhomework::history{'resource.version'};
-	$key ="resource.$version.checkedin";
+	my $version=$Apache::lonhomework::history{'resource.0.version'};
+	$key ="resource.$version.0.checkedin";
     } elsif ($type eq 'problem') {
 	$key ='resource.0.checkedin';
     }
@@ -260,8 +260,8 @@
     
     if ($type eq 'Task') {
 	my $version=$Apache::lonhomework::history{'resource.version'};
-	if ($Apache::lonhomework::history{"resource.$version.checkedin"} &&
-	    $Apache::lonhomework::history{"resource.$version.status"} eq 'pass') {
+	if ($Apache::lonhomework::history{"resource.$version.0.checkedin"} &&
+	    $Apache::lonhomework::history{"resource.$version.0.status"} eq 'pass') {
 	    return ('SHOW_ANSWER');
 	}
     }
@@ -297,11 +297,11 @@
 
     my ($pass_status,$checkedin);
     if ($type eq 'Task') {
-	my $version=$Apache::lonhomework::history{'resource.version'};
+	my $version=$Apache::lonhomework::history{'resource.0.version'};
 	$pass_status = 
-	    $Apache::lonhomework::history{"resource.$version.status"} eq 'fail';
+	    $Apache::lonhomework::history{"resource.$version.0.status"} eq 'fail';
 	$checkedin =
-	    $Apache::lonhomework::history{"resource.$version.checkedin"};
+	    $Apache::lonhomework::history{"resource.$version.0.checkedin"};
     } elsif ($type eq 'problem') {
 	$pass_status = 1;
 	$checkedin = $Apache::lonhomework::history{"resource.0.checkedin"};