Skip to content

Commit

Permalink
Merge pull request openwebwork#1019 from Alex-Jordan/multiple-choice
Browse files Browse the repository at this point in the history
Multiple choice
  • Loading branch information
drgrice1 authored Mar 20, 2024
2 parents d2bead5 + b5eed76 commit df9c40d
Show file tree
Hide file tree
Showing 4 changed files with 337 additions and 112 deletions.
14 changes: 14 additions & 0 deletions lib/Value/String.pm
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,20 @@ sub quoteHTML {
return '<span class="tex2jax_ignore">' . $s . '</span>';
}

#
# Quote XML special characters
#
sub quoteXML {
shift;
my $s = shift;
return unless defined $s;
return $s if eval('$main::displayMode') eq 'TeX';
$s =~ s/&/\&amp;/g;
$s =~ s/</\&lt;/g;
$s =~ s/>/\&gt;/g;
return $s;
}

#
# Render the value verbatim
#
Expand Down
30 changes: 30 additions & 0 deletions macros/parsers/parserMultipleChoice.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

=head1 NAME
parserMultipleChoice.pl - Load all the multiple choice parsers: PopUp, CheckboxList, RadioButtons, RadioMultiAnswer.
=head1 SYNOPSIS
loadMacros('parserMultipleChoice.pl');
=head1 DESCRIPTION
parserMultipleChoice.pl loads the following macro files:
=over
=item * parserPopUp.pl
=item * parserCheckboxList.pl
=item * parserRadioButtons.pl
=item * parserRadioMultiAnswer.pl
=back
=cut

loadMacros("parserPopUp.pl", "parserCheckboxList.pl", "parserRadioButtons.pl", "parserRadioMultiAnswer.pl");

1;
Loading

0 comments on commit df9c40d

Please sign in to comment.