--- loncom/homework/response.pm	2005/12/20 16:31:50	1.134
+++ loncom/homework/response.pm	2006/03/08 22:16:28	1.136
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # various response type definitons response definition
 #
-# $Id: response.pm,v 1.134 2005/12/20 16:31:50 albertel Exp $
+# $Id: response.pm,v 1.136 2006/03/08 22:16:28 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -37,8 +37,7 @@ BEGIN {
 
 sub start_response {
     my ($parstack,$safeeval)=@_;
-    my $id= &Apache::lonxml::get_param('id',$parstack,$safeeval);
-    if ($id eq '') { $id = $Apache::lonxml::curdepth; }
+    my $id = &Apache::lonxml::get_id($parstack,$safeeval);
     if ($#Apache::inputtags::import > -1) {
 	&Apache::lonxml::debug("Turning :$id: into");
 	$id = join('_',@Apache::inputtags::import).'_'.$id;
@@ -69,8 +68,7 @@ sub end_response {
 
 sub start_hintresponse {
     my ($parstack,$safeeval)=@_;
-    my $id= &Apache::lonxml::get_param('id',$parstack,$safeeval);
-    if ($id eq '') { $id = $Apache::lonxml::curdepth; }
+    my $id = &Apache::lonxml::get_id($parstack,$safeeval);
     push (@Apache::inputtags::hint,$id);
     push (@Apache::inputtags::hintlist,$id);
     push (@Apache::inputtags::paramstack,[%Apache::inputtags::params]);
@@ -884,7 +882,8 @@ sub add_to_gradingqueue {
     my ($symb,$courseid,$domain,$name) = &Apache::lonxml::whichuser();
     if (   $courseid eq ''
 	|| $symb eq ''
-	|| $env{'request.state'} eq 'construct') {
+	|| $env{'request.state'} eq 'construct'
+	|| $Apache::lonhomework::type ne 'problem') {
 	return;
     }