• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

FormulasQuestion / moodle-qtype_formulas / 13615610519
98%

Build:
DEFAULT BRANCH: main
Ran 02 Mar 2025 01:02PM UTC
Jobs 17
Files 22
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

02 Mar 2025 12:52PM UTC coverage: 93.899% (-0.008%) from 93.907%
13615610519

push

github

web-flow
better handling of vars vs. functions in student responses (#165)

If a student wrote 'sin 30', the parser used to interpret 'sin' as the sine function. This was done in order to have a syntax error (because of the missing parens) and thus allow the student to correct their mistake. The downside was that in '3 min' the 'min' would also be read as function, making it impossible to have minutes as units. (That could have been solved, because min is not among the functions a student may use. But the problem would have remained the same for "strange" units that someone might want to define for whatever reason, e. g. a unit 'exp' that would have been possible in versions 5.x and earlier. And who knows, maybe we will someday add a new function that could clash with a more common unit name.)

Now, we consider sin or min as variables, because they are not followed by parens. As students are not allowed to use variables in numerical answer types (number, numeric, numerical formula), this will still lead to a warning for the student while allowing for correct splitting even for units that are named after functions. So we lose no functionality, but have better separation.

For algebraic formulas, however, there would now be no error anymore, because students are allowed to use variables, so 'sin*30' would be syntactically valid. Therefore, the PR adds some code to disallow variables named like existing functions in student answers. This is still backwards compatible, because in older versions, function names were reserved and not available for variables at all, even for the teacher. Also, it does not interfere with the unit splitting, because there is no combined answer field for the answer type algebraic formula.

2 of 2 new or added lines in 1 file covered. (100.0%)

3663 of 3901 relevant lines covered (93.9%)

1165.15 hits per line

Jobs
ID Job ID Ran Files Coverage
1 13615610519.1 02 Mar 2025 01:02PM UTC 22
93.9
GitHub Action Run
2 13615610519.2 02 Mar 2025 01:02PM UTC 22
93.9
GitHub Action Run
3 13615610519.3 02 Mar 2025 01:06PM UTC 22
93.9
GitHub Action Run
4 13615610519.4 02 Mar 2025 01:09PM UTC 22
93.9
GitHub Action Run
5 13615610519.5 02 Mar 2025 01:10PM UTC 22
93.9
GitHub Action Run
6 13615610519.6 02 Mar 2025 01:11PM UTC 22
93.9
GitHub Action Run
7 13615610519.7 02 Mar 2025 01:11PM UTC 22
93.9
GitHub Action Run
8 13615610519.8 02 Mar 2025 01:11PM UTC 22
93.87
GitHub Action Run
9 13615610519.9 02 Mar 2025 01:11PM UTC 22
93.9
GitHub Action Run
10 13615610519.10 02 Mar 2025 01:11PM UTC 22
93.87
GitHub Action Run
11 13615610519.11 02 Mar 2025 01:12PM UTC 22
93.9
GitHub Action Run
12 13615610519.12 02 Mar 2025 01:12PM UTC 22
93.87
GitHub Action Run
13 13615610519.13 02 Mar 2025 01:12PM UTC 22
93.87
GitHub Action Run
14 13615610519.14 02 Mar 2025 01:12PM UTC 22
93.87
GitHub Action Run
15 13615610519.15 02 Mar 2025 01:12PM UTC 22
93.87
GitHub Action Run
16 13615610519.16 02 Mar 2025 01:12PM UTC 22
93.87
GitHub Action Run
17 13615610519.17 02 Mar 2025 01:12PM UTC 22
93.87
GitHub Action Run
Source Files on build 13615610519
  • Tree
  • List 22
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 99d438ef on github
  • Prev Build on main (#13332863908)
  • Next Build on main (#13805288875)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc