![]() the initial implementation had an order-of-operations bug, causing most disabled or un-named inputs to be serialized, as well as unchecked checkboxes and radio buttons. radio buttons were also serialized as bools, which makes absolutely no sense. these weird issues inspired little patches (and regressions), but the the major underlying problems were never really fixed, so here we are. this commit resets $.serializeForm to a straight coffeescript port of $.serializeArray (no underscore conversion), with just the things we need: 1. a canvas-friendly value mapper (for date pickers, files and tinymce) 2. support for non-forms additionally, change (almost) every checkbox field in handlebars templates to use the {{checkbox}} helper (so you get the hidden input right before it, a la rails) a notable side effect is that checkboxes are no longer serialized as booleans, rather as "1" / "0" (or whatever the value is, per the html spec). so now you can use checkboxes for non-bool scenarios (e.g. multiple selection), which is nice. the big takeaway is you should *not* do truthy checks on checkbox values in coffeescript moving forward if you use the {{checkbox}} helper, since "0" is truthy. test plan: 1. run specs 2. regression test of checkbox functionality in the following places: * gradebook2 dialogs w/ checkboxes, specifically: * group weights dialog * curve grades dialog * submission details * create/edit assignment (lots of checkboxes) * don't forget turnitin settings * create/edit appointment group (scheduler) * edit timeslot (scheduler) * edit calendar event (specifically section-level dates) * create/edit conference * conversations (group convo / faculty journal options) * add course users dialog (limit-to-section option) * discussion settings dialog (index page) * create/edit discussion topic (various options) * notification preferences (just a couple checkboxes) 3. regression of radio button functionality in the following places: * content migrations * delete assignment group dialog Change-Id: Ifa5ef3cea954ca260a899da9fa426f8f833472f8 Reviewed-on: https://gerrit.instructure.com/23096 Tested-by: Jenkins <jenkins@instructure.com> Product-Review: Marc LeGendre <marc@instructure.com> QA-Review: Marc LeGendre <marc@instructure.com> Reviewed-by: Landon Wilkins <lwilkins@instructure.com> Reviewed-by: Ryan Florence <ryanf@instructure.com> |
||
---|---|---|
app | ||
config | ||
db/migrate | ||
doc | ||
guard | ||
lib | ||
node_modules | ||
public | ||
script | ||
spec | ||
vendor/plugins | ||
.gitignore | ||
.jshintrc | ||
CONTRIBUTING.md | ||
COPYRIGHT | ||
Gemfile | ||
Guardfile | ||
LICENSE | ||
README.md | ||
Rakefile | ||
config.ru | ||
package.json |
README.md
Canvas LMS
Canvas is a new, open-source LMS by Instructure Inc. It is released under the AGPLv3 license for use by anyone interested in learning more about or using learning management systems.
Please see our main wiki page for more information
Installation
Detailed instructions for installation and configuration of Canvas are provided on our wiki.