Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
christianp opened this issue Dec 12, 2022 · 5 comments
Open

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

christianp opened this issue Dec 12, 2022 · 5 comments

Comments

@christianp
Copy link
Member

christianp commented Dec 12, 2022

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
Copy link

smhenderson89 commented Sep 12, 2023

@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
Copy link
Member Author

@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
Copy link

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

@smhenderson89
Copy link

@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
Copy link

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants