Log Message:
-----------
Fixed bug #1435 which prevented showHints and showSolutions from working.
Added -value =>1 to the checkbox items so that they return numeric
values rather than "on".
Modified Files:
--------------
webwork2/lib/WeBWorK/ContentGenerator:
Problem.pm
Revision Data
-------------
Index: Problem.pm
===================================================================
RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm,v
retrieving revision 1.211
retrieving revision 1.212
diff -Llib/WeBWorK/ContentGenerator/Problem.pm -Llib/WeBWorK/ContentGenerator/Problem.pm -u -r1.211 -r1.212
--- lib/WeBWorK/ContentGenerator/Problem.pm
+++ lib/WeBWorK/ContentGenerator/Problem.pm
@@ -581,6 +581,7 @@
my %will;
foreach (keys %must) {
$will{$_} = $can{$_} && ($want{$_} || $must{$_});
+ #warn "final values for options $_ is can $can{$_}, want $want{$_}, must $must{$_}, will $will{$_}";
}
##### sticky answers #####
@@ -1000,6 +1001,7 @@
-name => "showCorrectAnswers",
-checked => $will{showCorrectAnswers},
-label => "Show correct answers",
+ -value => 1,
);
}
if ($can{showHints}) {
@@ -1008,6 +1010,7 @@
-name => "showHints",
-checked => $will{showHints},
-label => "Show Hints",
+ -value =>1,
)
);
}
@@ -1016,6 +1019,7 @@
-name => "showSolutions",
-checked => $will{showSolutions},
-label => "Show Solutions",
+ -value => 1,
);
}
|