Skip to content

Commit

Permalink
Merge pull request openwebwork#148 from goehle/hotfixes
Browse files Browse the repository at this point in the history
Backport fixes
  • Loading branch information
mgage committed Aug 30, 2013
2 parents 52bffbf + 79bd18d commit 5183fe4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
3 changes: 2 additions & 1 deletion lib/WeBWorK/ContentGenerator/Hardcopy.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
33 changes: 18 additions & 15 deletions lib/WeBWorK/ContentGenerator/Instructor/ProblemSetList2.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2241,25 +2241,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
);
}
}
Expand Down

0 comments on commit 5183fe4

Please sign in to comment.