Go to file
Jon Jensen c25df1cc50 clean up $.serializeForm and make it Just Work™, fixes CNVS-7407
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>
2013-08-15 19:48:18 +00:00
app clean up $.serializeForm and make it Just Work™, fixes CNVS-7407 2013-08-15 19:48:18 +00:00
config wiki page comments are unused; excise them 2013-08-15 16:34:37 +00:00
db/migrate wiki page comments are unused; excise them 2013-08-15 16:34:37 +00:00
doc add note in api documentation about 64 bit ids 2013-08-01 19:56:37 +00:00
guard ember 2013-08-14 20:04:10 +00:00
lib prevent students from searching by user login/sis id 2013-08-15 15:55:17 +00:00
node_modules update require.js node module 2012-06-27 17:29:47 -06:00
public wiki page comments are unused; excise them 2013-08-15 16:34:37 +00:00
script useful find_each 2013-07-18 22:26:46 +00:00
spec clean up $.serializeForm and make it Just Work™, fixes CNVS-7407 2013-08-15 19:48:18 +00:00
vendor/plugins fix unused courses reports to ignore deleted files 2013-08-14 22:32:00 +00:00
.gitignore implemented dress_code 2013-04-09 15:43:16 +00:00
.jshintrc make jslint settings more sane 2012-08-17 11:04:40 -06:00
CONTRIBUTING.md add a contributing doc for github coolness 2012-09-19 10:16:04 -06:00
COPYRIGHT Initial commit. 2011-01-31 18:57:29 -07:00
Gemfile update fake_rails3_routes to 1.0.4 2013-08-12 22:21:37 +00:00
Guardfile ember 2013-08-14 20:04:10 +00:00
LICENSE Initial commit. 2011-01-31 18:57:29 -07:00
README.md README changes to point more directly to installation instructions 2011-02-01 17:36:01 -07:00
Rakefile get rspec 2 running with rails 3.0 2013-03-27 15:41:28 +00:00
config.ru start adding rails 3.0 support 2013-03-22 19:08:40 +00:00
package.json AMD Conversion 2012-02-06 16:41:40 -07:00

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.