[prev in list] [next in list] [prev in thread] [next in thread]
List: lon-capa-cvs
Subject: [LON-CAPA-cvs] cvs: loncom /homework optionresponse.pm
From: foxr <foxr () source ! lon-capa ! org>
Date: 2012-06-25 10:36:00
Message-ID: cvsfoxr1340620560 () cvsserver
[Download RAW message or body]
foxr Mon Jun 25 10:36:00 2012 EDT
Modified files:
/loncom/homework optionresponse.pm
Log:
BZ 6597 - support noprompt attribute in <foilgroup> tag. When present and
having a value of '1' supresses the prompt to select all that are true.
Index: loncom/homework/optionresponse.pm
diff -u loncom/homework/optionresponse.pm:1.185 \
loncom/homework/optionresponse.pm:1.186
--- loncom/homework/optionresponse.pm:1.185 Wed Apr 18 19:45:39 2012
+++ loncom/homework/optionresponse.pm Mon Jun 25 10:36:00 2012
@@ -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 @@
-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 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 @@
}
my $internal_counter=$Apache::lonxml::counter;
my $checkboxopt=&check_box_opt($target,$checkboxvalue,@opt);
- if ($checkboxopt) {
+ if ($checkboxopt && (!$no_tfprompt)) {
$result.='<br />'.
($checkboxchoices?&mt('Choices: ').'<b>'.$opt[0].','.$opt[1].'</b>. \
':''). &mt('Select all that are <b>[_1]</b>.',$checkboxopt);
_______________________________________________
LON-CAPA-cvs mailing list
LON-CAPA-cvs@mail.lon-capa.org
http://mail.lon-capa.org/mailman/listinfo/lon-capa-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic