--- loncom/homework/response.pm 2003/08/11 19:56:45 1.83
+++ loncom/homework/response.pm 2003/10/06 21:57:54 1.86
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# various response type definitons response definition
#
-# $Id: response.pm,v 1.83 2003/08/11 19:56:45 albertel Exp $
+# $Id: response.pm,v 1.86 2003/10/06 21:57:54 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -180,6 +180,16 @@ sub mandatory_part_meta {
#
}
+sub meta_part_order {
+ if (@Apache::inputtags::partlist) {
+ my @parts=@Apache::inputtags::partlist;
+ shift(@parts);
+ return '
Answer for Part:'. $Apache::inputtags::part. ' | '."\n"; @@ -556,6 +566,14 @@ sub whichorder { return @whichopt; } +sub show_answer { + my $part = $Apache::inputtags::part; + my $award = $Apache::lonhomework::history{"resource.$part.solved"}; + my $status = $Apache::inputtags::status[-1]; + return ( ($award =~ /^correct/ + && lc($Apache::lonhomework::problemstatus) ne 'no') + || $status eq "SHOW_ANSWER"); +} 1; __END__