Skip to content

Commit

Permalink
always use answerRule optional name argument for PGbasicmacros answer…
Browse files Browse the repository at this point in the history
… rules
  • Loading branch information
Alex-Jordan committed Jun 26, 2023
1 parent 838bff9 commit b45d451
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions macros/core/PGbasicmacros.pl
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ sub NAMED_ANS_RULE {
$tcol = $tcol < 40 ? $tcol : 40; ## get min

MODES(
TeX => ($name ? "\\answerRule[$name]{$tcol}" : "\\answerRule{$tcol}"),
TeX => "\\answerRule[$name]{$tcol}",
Latex2HTML => qq!\\begin{rawhtml}<input type=text size=$col name="$name" value="">\\end{rawhtml}!,

# Note: codeshard is used in the css to identify input elements that come from pg
Expand Down Expand Up @@ -360,7 +360,7 @@ sub NAMED_HIDDEN_ANS_RULE {
$tcol = $tcol < 40 ? $tcol : 40; ## get min

MODES(
TeX => ($name ? "\\answerRule[$name]{$tcol}" : "\\answerRule{$tcol}"),
TeX => "\\answerRule[$name]{$tcol}",
Latex2HTML => qq!\\begin{rawhtml}<input type=text name="$name" value="">\\end{rawhtml}!,
HTML => qq!<input type=hidden name="$name" id="$name" value="$answer_value">!
. qq!<input type=hidden name="previous_$name" id="previous_$name" value="$answer_value">!,
Expand Down Expand Up @@ -413,7 +413,7 @@ sub NAMED_ANS_RULE_EXTENSION {
my $tcol = $col / 2 > 3 ? $col / 2 : 3; ## get max
$tcol = $tcol < 40 ? $tcol : 40; ## get min
MODES(
TeX => ($name ? "\\answerRule[$name]{$tcol}" : "\\answerRule{$tcol}"),
TeX => "\\answerRule[$name]{$tcol}",
Latex2HTML =>
qq!\\begin{rawhtml}\n<input type=text size=$col name="$name" id="$name" value="">\n\\end{rawhtml}\n!,
HTML => qq!<input type=text class="codeshard" size=$col name="$name" id="$name" aria-label="$label" !
Expand Down Expand Up @@ -1079,7 +1079,7 @@ sub NAMED_ANS_ARRAY_EXTENSION {
$tcol = $tcol < 40 ? $tcol : 40; ## get min

MODES(
TeX => ($name ? "\\answerRule[$name]{$tcol}" : "\\answerRule{$tcol}"),
TeX => "\\answerRule[$name]{$tcol}",
Latex2HTML =>
qq!\\begin{rawhtml}\n<input type=text size=$col name="$name" id="$name" value="">\n\\end{rawhtml}\n!,
HTML => qq!<input type=text size=$col name="$name" id="$name" class="codeshard" aria-label="$label" !
Expand Down

0 comments on commit b45d451

Please sign in to comment.