Skip to content

Commit

Permalink
only show "write your answer as a fraction" if fractions are allowed.
Browse files Browse the repository at this point in the history
The commit c9d72dd should have checked that fractions are allowed.
  • Loading branch information
christianp committed Sep 26, 2024
1 parent 76a46fe commit 7ff4aad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion themes/default/files/scripts/parts/numberentry-display.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,10 @@ Numbas.queueScript('display/parts/numberentry',['display-base','part-display','u
if(this.part.settings.precisionType=='none') {
if(this.part.settings.mustBeReduced) {
return R('part.numberentry.give your answer as a reduced fraction');
} else {
} else if(this.part.settings.allowFractions) {
return R('part.numberentry.write your answer as a fraction');
} else {
return '';
}
} else {
var precision = this.part.settings.precision;
Expand Down

0 comments on commit 7ff4aad

Please sign in to comment.