--- loncom/homework/inputtags.pm 2005/07/11 19:41:53 1.171
+++ loncom/homework/inputtags.pm 2005/08/02 18:05:25 1.173
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# input definitons
#
-# $Id: inputtags.pm,v 1.171 2005/07/11 19:41:53 albertel Exp $
+# $Id: inputtags.pm,v 1.173 2005/08/02 18:05:25 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -43,9 +43,13 @@ sub initialize_inputtags {
# list of all input ids seen in this problem
@Apache::inputtags::inputlist=();
# list of all current response ids
- @Apache::inputtags::response=();
+ @Apache::inputtags::hint=();
# list of all response ids seen in this problem
@Apache::inputtags::responselist=();
+ # list of all current hint ids
+ @Apache::inputtags::response=();
+ # list of all hint ids seen in this problem
+ @Apache::inputtags::hintlist=();
# list of whether or not a specific response was previously used
@Apache::inputtags::previous=();
# submission it was used in
@@ -75,6 +79,7 @@ sub check_for_duplicate_ids {
my %check;
foreach my $id (@Apache::inputtags::partlist,
@Apache::inputtags::responselist,
+ @Apache::inputtags::hintlist,
@Apache::inputtags::importlist) {
$check{$id}++;
}
@@ -426,19 +431,18 @@ sub decideoutput {
$message=&mt('Incorrect.');
$bgcolor=$possiblecolors{'charged_try'};
}
-
- if ($target eq 'tex') {
- $message = '\textbf{'.$message.'}';
- } else {
- $message = "".$message."";
- }
- $added_computer_text=1;
-
- if ($env{'request.filename'} !~
+ if ($env{'request.filename'} =~
m|/res/lib/templates/examupload.problem$|) {
- if ($target ne 'tex') {
+ $message = &mt("A score has been assigned.");
+ $added_computer_text=1;
+ } else {
+ if ($target eq 'tex') {
+ $message = '\textbf{'.$message.'}';
+ } else {
+ $message = "".$message."";
$message.=" ".&mt("Computer's answer now shown above.");
}
+ $added_computer_text=1;
unless ($env{'course.'.
$env{'request.course.id'}.
'.disable_receipt_display'} eq 'yes') {