numbas / Numbas

A completely browser-based e-assessment/e-learning system, with an emphasis on mathematics
http://www.numbas.org.uk
Apache License 2.0
207 stars 122 forks source link

Text next to number entry input specifying precision #454

Closed christianp closed 8 years ago

christianp commented 8 years ago

Pretty much every number entry question I write has "give your answer to 3 decimal places" in the prompt.

This text should automatically be displayed next to the input, for non-gapfill numberentry parts. For gapfills, I don't think there's a way of showing the hint without interfering with the layout.

christianp commented 8 years ago

To do this:

You could also add an option to not display the message, which would involve touching the editor.

wandeg commented 8 years ago

Hi is it ok if I take this up?

christianp commented 8 years ago

Sure! Thanks!

wandeg commented 8 years ago

I'm not sure what you meant by 'Make sure it's only shown when the part has no parent' in point 2, my web development is a bit rusty. Please have a look at the pull request and comment on any necessary changes

christianp commented 8 years ago

I ended up adding an option to show the hint or not - the main reason is that we've got a lot of existing questions which have the same text in the question prompt already. It also lets us have the text in gapfill parts, but allow it to be omitted when the layout would make it awkward.

@wandeg: I suggest you get a local copy of the Numbas editor installed before making any more changes. Thanks for taking the first step and making a pull request, though!

wandeg commented 8 years ago

Will do. Thanks for marking it as up-for-grabs for first timers .