Closed christianp closed 1 year ago
Hi @christianp I wish to work on this issue. Can you please guide me where to get started with.
Hi @likileads, thanks for offering to help! First you should set up a development environment. There are some instructions at https://docs.numbas.org.uk/en/latest/development/installation.html.
Once you've done that, I think that adding a line like this.marks = this.marks || 0
to Numbas.Part.finaliseLoad
would resolve this.
To test this, use the editor to create a question with a single part, and empty the "Marks" field. When you run the question, Numbas.exam.currentQuestion.parts[0].marks
should evaluate to 0
instead of ''
.
At the moment, it seems that leaving the field completely empty leads to the part's
marks
attribute being the empty string, which then producesNaN
credit when the part is submitted.