--- loncom/homework/optionresponse.pm 2012/04/18 19:45:39 1.185
+++ loncom/homework/optionresponse.pm 2012/06/25 10:36:00 1.186
@@ -1,7 +1,7 @@
# LearningOnline Network with CAPA
# option list style responses
#
-# $Id: optionresponse.pm,v 1.185 2012/04/18 19:45:39 raeburn Exp $
+# $Id: optionresponse.pm,v 1.186 2012/06/25 10:36:00 foxr Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -203,13 +203,15 @@ sub end_foilgroup {
-2,0);
my $checkboxvalue=&Apache::lonxml::get_param('checkboxvalue',$parstack,$safeeval);
my $checkboxchoices=(&Apache::lonxml::get_param('checkboxoptions',$parstack,$safeeval) ne 'nochoice');
+ my $noprompt =&Apache::lonxml::get_param('noprompt', $parstack, $safeeval);
+
if ($target eq 'tex' && $tex_option_switch eq 'nochoice') {@opt=();}
&Apache::lonxml::debug("Options are $#opt");
my $max = &Apache::lonxml::get_param('max',$parstack,$safeeval,'-2');
my $randomize = &Apache::lonxml::get_param('randomize',$parstack,
$safeeval,'-2');
if ($target eq 'web' || $target eq 'tex') {
- $result.=&displayfoils($target,$max,$randomize,$TeXlayout,$checkboxvalue,$checkboxchoices,$tex_option_switch,@opt);
+ $result.=&displayfoils($target,$max,$randomize,$TeXlayout,$checkboxvalue,$checkboxchoices,$tex_option_switch, $noprompt, @opt);
$Apache::lonxml::post_evaluate=0;
} elsif ( $target eq 'answer') {
$result.=&displayanswers($max,$randomize,@opt);
@@ -486,7 +488,7 @@ sub check_for_invalid {
sub displayfoils {
my ($target,$max,$randomize,$TeXlayout,$checkboxvalue,$checkboxchoices,
- $tex_option_switch,@opt)=@_;
+ $tex_option_switch, $no_tfprompt, @opt)=@_;
if (!defined(@{ $Apache::response::foilgroup{'names'} })) {return;}
my @names = @{ $Apache::response::foilgroup{'names'} };
my @truelist;
@@ -552,7 +554,7 @@ sub displayfoils {
}
my $internal_counter=$Apache::lonxml::counter;
my $checkboxopt=&check_box_opt($target,$checkboxvalue,@opt);
- if ($checkboxopt) {
+ if ($checkboxopt && (!$no_tfprompt)) {
$result.='
'.
($checkboxchoices?&mt('Choices: ').''.$opt[0].','.$opt[1].'. ':'').
&mt('Select all that are [_1].',$checkboxopt);