--- loncom/homework/inputtags.pm 2014/09/14 15:21:43 1.325
+++ loncom/homework/inputtags.pm 2014/09/15 17:45:35 1.326
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# input definitons
#
-# $Id: inputtags.pm,v 1.325 2014/09/14 15:21:43 raeburn Exp $
+# $Id: inputtags.pm,v 1.326 2014/09/15 17:45:35 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -235,6 +235,7 @@ sub start_textfield {
my $addchars=&Apache::lonxml::get_param('addchars',$parstack,$safeeval);
$result='';
my $tagident = 'HWVAL_' . $resid;
+ my $itemid = 'HWVAL_'.$partid.'_'.$resid;
if ($addchars) {
$result.=&addchars($tagident, $addchars);
}
@@ -243,7 +244,7 @@ sub start_textfield {
'externalresponse')) {
$textareaclass = 'class="LC_richDetectHtml spellchecked"';
}
- $result.= '";
- $result .= &spellcheck_onblur($tagident, $spellcheck);
+ $result .= &spellcheck_onblur($itemid, $spellcheck);
return $result;
}
} elsif ($target eq 'edit') {
@@ -457,18 +459,19 @@ sub start_textline {
$readonly='';
}
my $name = 'HWVAL_'.$id;
+ my $itemid = 'HWVAL_'.$partid.'_'.$id;
if ($Apache::inputtags::status[-1] eq 'CANNOT_ANSWER') {
$name = "none";
}
$result.= '';
- $result .= &spellcheck_onblur($name, $spellcheck);
+ $result .= &spellcheck_onblur($itemid, $spellcheck);
}
if ($Apache::lonhomework::type eq 'exam'
&& &needs_exam_box($tagstack)) {