Category and Item weightings accept negative values for extra credit items.
Description
Activity
Nancy Wilkison January 23, 2011 at 12:03 PM
SmartSite@UCDavis - 2.6.4.2 - Sakai 2.6.2 - Server "ucddev1"
gb v1.4.0-a5
TEST PROCESS -
on a weighted category site (XXX 123 123 w11)
1 - tried to edit existing categories to a negative %grade - fail (as w/previous testing)
error box pops up and says %grade must be between 0-100%
2 - created NEW category and attempted to define as negative %grade - fail (so this is the new fix)
error box pops up and says %grade must be between 0-100% and you can't save or close until you correct it
cancel works as expected
3 - previously negative weighted category gives error message but @ close the negative number holds. you can edit it to a new negative number, get the error, and @ save/close it reverts to the original negative number. I don't think this is an issue as now you're prevented from making it negative in the first place.
RESULTS -
pass for edit and new categories now
Nancy Wilkison January 21, 2011 at 11:24 AMEdited
ahHA!
I've got it. tried it and now I see...
you can't EDIT either a category or item weight and CHANGE it to a negative number.
BUT...on a new site (ZZZ 123 123 w11), creating a new category, I can get the negative number to stay for category weight.
had to add 2 new items to get category weight box to show. then, added a 3rd, specified a negative number and that held, too.
adding new items in another category, the category weight box displayed with the 1st item added.
I was editing before, which is why I couldn't add a negative number, I guess...
the description way above was not clear.
Michael Wenk January 20, 2011 at 4:57 PM
Current code works in that when creating an item, there's a visual cue that says the negative value will not work, yet when you click save, it accepts the negative weighting. The validation this JIRA does is much stronger and will not do anything when you click save if there's a negative value in the weight field.
Nancy Wilkison January 20, 2011 at 1:25 PMEdited
then why could I NOT enter negative numbers?
and why did I get appropriate error indications when I tried to enter a negative value?
here and in grbk-790...
Thomas Amsler January 20, 2011 at 10:03 AM
This is not ready for testing yet since it will be part of the v1.4.0-a5 tag, and that tag has not been deployed to https://smartsite-dev.rsmart.com/xsl-portal yet. . Currently, we are running v1.4.0-a4 on https://smartsite-dev.rsmart.com/xsl-portal.
Functional Description: Prevent the possibility of allowing the creation of negatively weighted categories and items.
Category and Item weightings can take negative values and should not be able to.
This needs to be handled in both the client code and the server side import code.