| … | |
… | |
| 245 | $context->{parser}{Number} = "Parser::Legacy::LimitedNumeric::Number"; |
245 | $context->{parser}{Number} = "Parser::Legacy::LimitedNumeric::Number"; |
| 246 | |
246 | |
| 247 | $context = $main::context{'Fraction-NoDecimals'} = $context->copy; |
247 | $context = $main::context{'Fraction-NoDecimals'} = $context->copy; |
| 248 | $context->{name} = "Fraction-NoDecimals"; |
248 | $context->{name} = "Fraction-NoDecimals"; |
| 249 | Parser::Number::NoDecimals($context); |
249 | Parser::Number::NoDecimals($context); |
|
|
250 | $context->{error}{msg}{"You are not allowed to type decimal numbers in this problem"} = |
|
|
251 | "You are only allowed to enter fractions, not decimal numbers"; |
| 250 | |
252 | |
| 251 | $context = $main::context{LimitedFraction} = $context->copy; |
253 | $context = $main::context{LimitedFraction} = $context->copy; |
| 252 | $context->{name} = "LimitedFraction"; |
254 | $context->{name} = "LimitedFraction"; |
| 253 | $context->operators->undefine( |
255 | $context->operators->undefine( |
| 254 | '+', '-', '*', '* ', '^', '**', |
256 | '+', '-', '*', '* ', '^', '**', |