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
205 stars 120 forks source link

"Begin blank" option for drop-down list #974

Open christianp opened 1 year ago

christianp commented 1 year ago

In a "choose one from a list" part with selection type set to "drop down list", the list has an empty option at the top of the list, so that the student is forced to make a choice.

In some cases, it's OK to have a default option selected, which could be arranged to be the first option in the list.

An example from Will Haynes is when you're asked to enter an angle either clockwise or counter-clockwise, with separate inputs for the amount and the direction. Having the clockwise direction selected by default would be convenient.

There should be a "begin blank" option, which when turned off would remove the empty option, so the first option is selected by default.

smhenderson89 commented 1 year ago

@christianp if this is still open I'd love to work on this. I'm getting my feet wet with open source projects :)

To clarify, you are talking about this section over here (Link: https://numbas.mathcentre.ac.uk/exam/1973/numbas-website-demo/embed/)

Here is how it currently displays: image

You are thinking about something along the lines of this to include? Here's my idea of how to display the options to the user.

8C0AB96F-A3A6-42FE-9BCF-6ACD938EEFAC_4_5005_c

christianp commented 1 year ago

@smhenderson89 yes, that's right.

Please have a look at our guidelines on contributing to Numbas and let me know if you need any help getting started.

smhenderson89 commented 1 year ago

@christianp Great, let me get started and see if I have any questions.

smhenderson89 commented 1 year ago

@christianp I got the development server up and running. I tried poking around the github and couldn't quite figure out where I should be looking for the files to edit the demo website. I'm also new to django so could be part of that as well (Did some python, mostly javascript work, looking to try new things).

I see that the website is composed of using lots of templates and views. How do I find the script page/html page for the Drop-down list question?

Thanks for the help :)

Maheshwaran17 commented 2 months ago

@christianp , Hope you are doing good. I have made a change to have the disabled placeholder instead of blank option in the dropdown. Please find below the test result. Could you please let me know if you are fine with this fix. Please approve the Pull request 1108 you are happy with this fix otherwise let me know if in case of any suggestions. Thanks in advance!

Dropdown placeholder