[LON-CAPA-cvs] cvs: loncom /homework default_homework.lcpm inputtags.pm
damieng
damieng at source.lon-capa.org
Tue Dec 6 15:51:11 EST 2016
damieng Tue Dec 6 20:51:11 2016 EDT
Modified files:
/loncom/homework default_homework.lcpm inputtags.pm
Log:
added input_id sub for bug 6821
Index: loncom/homework/default_homework.lcpm
diff -u loncom/homework/default_homework.lcpm:1.170 loncom/homework/default_homework.lcpm:1.171
--- loncom/homework/default_homework.lcpm:1.170 Sun Dec 14 02:43:59 2014
+++ loncom/homework/default_homework.lcpm Tue Dec 6 20:51:11 2016
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# used by lonxml::xmlparse() as input variable $safeinit to Apache::run::run()
#
-# $Id: default_homework.lcpm,v 1.170 2014/12/14 02:43:59 raeburn Exp $
+# $Id: default_homework.lcpm,v 1.171 2016/12/06 20:51:11 damieng Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1458,3 +1458,8 @@
}
}
+sub input_id {
+ my ($part_id, $response_id, $textline_id) = @_;
+ return 'HWVAL_'.$part_id.'_'.$response_id.'_'.$textline_id;
+}
+
Index: loncom/homework/inputtags.pm
diff -u loncom/homework/inputtags.pm:1.343 loncom/homework/inputtags.pm:1.344
--- loncom/homework/inputtags.pm:1.343 Mon May 30 02:45:32 2016
+++ loncom/homework/inputtags.pm Tue Dec 6 20:51:11 2016
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# input definitons
#
-# $Id: inputtags.pm,v 1.343 2016/05/30 02:45:32 raeburn Exp $
+# $Id: inputtags.pm,v 1.344 2016/12/06 20:51:11 damieng Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -460,6 +460,7 @@
}
my $name = 'HWVAL_'.$id;
my $itemid = 'HWVAL_'.$partid.'_'.$id;
+ # NOTE: the input id should match the one given by defaut_homework input_id().
my $input_tag_id = $itemid.'_'.$input_id;
if ($Apache::inputtags::status[-1] eq 'CANNOT_ANSWER') {
$name = "none";
More information about the LON-CAPA-cvs
mailing list