-
-
Notifications
You must be signed in to change notification settings - Fork 166
Remove the label/value hack on the "Set Detail" page. #2845
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
base: develop
Are you sure you want to change the base?
Conversation
aa0e701 to
c304f99
Compare
e1545e0 to
a424777
Compare
a424777 to
cf12466
Compare
8a7994b to
af7a385
Compare
Alex-Jordan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good!
|
Just checked, didn't realize that it is currently possible to allow |
af7a385 to
fac5cb1
Compare
|
The only option for setting a value when switching from the non-numeric select values to the numeric value would be to use the The suggested addition of As to the issue when the window size is in between the |
This make those fields that have the special word values (such as "Unlimited", "Set Default", etc.) be numeric inputs again. However, those special word values are separated into a select. So now there is a select and a number input. The select gives the option to choose one of those word values, and it also has a numeric option (labeled appropriately for the field). When that numeric option is selected then the value in the number input is used. With this change the old "undoLabels" hack is no longer needed. That is the hack that switched the word values back to the numeric values server side. The select options already have the correct value. The select also has a special "numeric" value that signals that the number in the number input is to be used instead. This is an approach to replace the previous number input approach implemented in openwebwork#2820 and reverted in openwebwork#2823. Unfortunately that approach had some issues that could not be relegated purely with a number input. I also noticed that there was an issue when the $test{maxProblemsPerPage} variable is set to 1. In that case the `problems_per_page` setting would not be shown when editing the global set or editing a set for several users. However, when editing the set for a single user the setting would be shown, although it still couldn't be edited. It doesn't make any sense to show an option that can't be edited for the set as a whole, and isn't even shown in that case, when editing for a single user. In fixing that issue I noticed that the override "none" setting in the `FIELD_PROPERTIES` hash is rather messed up. See the comment I added on line 84 of the `ProblemSetDetail.pm` file. That setting is no longer used since I removed the `attempted`, `last_answer`, `num_correct`, and `num_incorrect` fields from the hash that were nonsensically included in that hash with the override "none" and type "hidden" values, which basically meant that those fields were ignored everywhere. Note the `FIELD_PROPERTIES_GWQUIZ` constant was also remove because it was not used in actuality. The only field in that hash was the `max_attempts` field, but since it is no included in the `GATEWAY_PROBLEM_FIELD_ORDER` array that hash key was never accessed.
problem render below the problem fields on the set detail page.
set, and the select is switched from a non-numeric value selection to the numeric value selection on the set detail page.
fac5cb1 to
7ec7f49
Compare
|
I went ahead and made it so that when switching from a non-numeric selection to the numeric selection, the number input now gets the minimum value. |
This make those fields that have the special word values (such as "Unlimited", "Set Default", etc.) be numeric inputs again. However, those special word values are separated into a select. So now there is a select and a number input. The select gives the option to choose one of those word values, and it also has a numeric option (labeled appropriately for the field). When that numeric option is selected then the value in the number input is used.
With this change the old "undoLabels" hack is no longer needed. That is the hack that switched the word values back to the numeric values server side. The select options already have the correct value. The select also has a special "numeric" value that signals that the number in the number input is to be used instead.
This is an approach to replace the previous number input approach implemented in #2820 and reverted in #2823. Unfortunately that approach had some issues that could not be relegated purely with a number input.
I also noticed that there was an issue when the $test{maxProblemsPerPage} variable is set to 1. In that case the
problems_per_pagesetting would not be shown when editing the global set or editing a set for several users. However, when editing the set for a single user the setting would be shown, although it still couldn't be edited. It doesn't make any sense to show an option that can't be edited for the set as a whole, and isn't even shown in that case, when editing for a single user. In fixing that issue I noticed that the override "none" setting in theFIELD_PROPERTIEShash is rather messed up. See the comment I added on line 84 of theProblemSetDetail.pmfile. That setting is no longer used since I removed theattempted,last_answer,num_correct, andnum_incorrectfields from the hash that were nonsensically included in that hash with the override "none" and type "hidden" values, which basically meant that those fields were ignored everywhere.Note the
FIELD_PROPERTIES_GWQUIZconstant was also remove because it was not used in actuality. The only field in that hash was themax_attemptsfield, but since it is no included in theGATEWAY_PROBLEM_FIELD_ORDERarray that hash key was never accessed.