[LON-CAPA-cvs] cvs: loncom /homework hint.pm response.pm /publisher addid.tab
albertel
lon-capa-cvs@mail.lon-capa.org
Thu, 13 Feb 2003 23:48:27 -0000
albertel Thu Feb 13 18:48:27 2003 EDT
Modified files:
/loncom/publisher addid.tab
/loncom/homework response.pm hint.pm
Log:
- Fixes most of BUG#1194, still need to work on editing
Index: loncom/publisher/addid.tab
diff -u loncom/publisher/addid.tab:1.13 loncom/publisher/addid.tab:1.14
--- loncom/publisher/addid.tab:1.13 Mon Jan 7 14:10:13 2002
+++ loncom/publisher/addid.tab Thu Feb 13 18:48:27 2003
@@ -3,6 +3,10 @@
caparesponse id
numericalresponse id
numericalhint id
+stringhint id
+formulahint id
+optionhint id
+radiobuttonhint id
stringresponse id
formularesponse id
radiobuttonresponse id
Index: loncom/homework/response.pm
diff -u loncom/homework/response.pm:1.68 loncom/homework/response.pm:1.69
--- loncom/homework/response.pm:1.68 Wed Nov 27 14:25:56 2002
+++ loncom/homework/response.pm Thu Feb 13 18:48:27 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# various response type definitons response definition
#
-# $Id: response.pm,v 1.68 2002/11/27 19:25:56 albertel Exp $
+# $Id: response.pm,v 1.69 2003/02/13 23:48:27 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -68,7 +68,10 @@
sub end_hintresponse {
pop @Apache::inputtags::response;
- %Apache::inputtags::params=@{pop(@Apache::inputtags::paramstack)};
+ if (defined($Apache::inputtags::paramstack[-1])) {
+ %Apache::inputtags::params=
+ @{ pop(@Apache::inputtags::paramstack) };
+ }
return '';
}
Index: loncom/homework/hint.pm
diff -u loncom/homework/hint.pm:1.34 loncom/homework/hint.pm:1.35
--- loncom/homework/hint.pm:1.34 Fri Feb 7 17:03:21 2003
+++ loncom/homework/hint.pm Thu Feb 13 18:48:27 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# implements the tags that control the hints
#
-# $Id: hint.pm,v 1.34 2003/02/07 22:03:21 albertel Exp $
+# $Id: hint.pm,v 1.35 2003/02/13 23:48:27 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -162,7 +162,7 @@
if ($ad eq 'EXACT_ANS' || $ad eq 'APPROX_ANS') { push (@Apache::hint::which,$name); }
$result='';
} elsif ($target eq 'meta') {
- $result=&Apache::response::meta_package_write('numericalhint');
+ $result=&Apache::response::meta_package_write($token->[1]);
} elsif ($target eq 'edit') {
$result.='</td></tr>'.&Apache::edit::end_table;
}
@@ -171,33 +171,19 @@
}
sub start_stringhint {
- my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
- my $result;
- if ($target eq 'meta') {
- $result=&Apache::response::meta_package_write('stringhint');
- } else {
- $result.=&start_numericalhint(@_);
- }
- return $result;
+ return &start_numericalhint(@_);
}
sub end_stringhint {
- return end_numericalhint(@_);
+ return &end_numericalhint(@_);
}
sub start_formulahint {
- my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
- my $result;
- if ($target eq 'meta') {
- $result=&Apache::response::meta_package_write('formulahint');
- } else {
- $result.=&start_numericalhint(@_);
- }
- return $result;
+ return &start_numericalhint(@_);
}
sub end_formulahint {
- return end_numericalhint(@_);
+ return end_numericalhint(@_);
}
# a part shows if it is on, if no specific parts are on, then default shows