From 1604417d65f6b36b671723d4adaaa5591d43c45a Mon Sep 17 00:00:00 2001 From: Geoff Goehle Date: Fri, 30 Aug 2013 16:57:51 -0400 Subject: [PATCH 1/2] Backported fix for Visible/Reduced Credit Enabled checkboxes always being marked. --- .../Instructor/ProblemSetList2.pm | 33 ++++++++++--------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetList2.pm b/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetList2.pm index bad2d04631..289f9fada1 100644 --- a/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetList2.pm +++ b/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetList2.pm @@ -2245,25 +2245,28 @@ sub fieldEditHTML { } if ($type eq "checked") { - + # FIXME: kludge (R) # if the checkbox is checked it returns a 1, if it is unchecked it returns nothing # in which case the hidden field overrides the parameter with a 0 - # kludge 2 -- get visible and reduced scoring to have no names (might reduce accessibility) - # my $label_text = $properties->{label_text} || "NoLabel"; - return WeBWorK::CGI_labeled_input( - -type=>"checkbox", - -id=>$fieldName."_id", - -label_text=>"", #$label_text, - -input_attr=>{ - -name => $fieldName, - -checked => $value, - -label => "", - -value => 1 - } + my %attr = ( name => $fieldName, + label => "", + value => 1 + ); + + $attr{'checked'} = 1 if ($value); + + + return WeBWorK::CGI_labeled_input( + -type=>"checkbox", + -id=>$fieldName."_id", +# The labeled checkboxes are making the table very wide. + -label_text=>"", +# -label_text=>ucfirst($fieldName), + -input_attr=>\%attr ) . CGI::hidden( - -name => $fieldName, - -value => 0 + -name => $fieldName, + -value => 0 ); } } From 79bd18d394c2774b477cb4e87b526aa2d470b9b9 Mon Sep 17 00:00:00 2001 From: Geoff Goehle Date: Fri, 30 Aug 2013 17:22:37 -0400 Subject: [PATCH 2/2] Fixed bug 2708 by commenting out tikz option --- lib/WeBWorK/ContentGenerator/Hardcopy.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/WeBWorK/ContentGenerator/Hardcopy.pm b/lib/WeBWorK/ContentGenerator/Hardcopy.pm index f0b2401d40..4e77f67c70 100644 --- a/lib/WeBWorK/ContentGenerator/Hardcopy.pm +++ b/lib/WeBWorK/ContentGenerator/Hardcopy.pm @@ -62,7 +62,8 @@ our $HC_DEFAULT_FORMAT = "pdf"; # problems if this is not an allowed format for our %HC_FORMATS = ( tex => { name => "TeX Source", subr => "generate_hardcopy_tex" }, pdf => { name => "Adobe PDF", subr => "generate_hardcopy_pdf" }, - tikz =>{ name => "TikZ PDF file", subr => "generate_hardcopy_tigz"}, +# Not ready for prime time +# tikz =>{ name => "TikZ PDF file", subr => "generate_hardcopy_tigz"}, ); # custom fields used in $self hash