Commit Graph

13 Commits

Author SHA1 Message Date
Landon Wilkins 4b562575ab da licença part 1
add consistent license headers to all source files
(ruby, coffeescript, javascript)

except for vendor files

Change-Id: I2e23d64a60765a7ae4006d37d3a66242a6629128
Reviewed-on: https://gerrit.instructure.com/110011
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-04-27 21:07:30 +00:00
Cody Cutrer 556f0b64bf rails 5: s/_filter/_action/g
fixes CNVS-34832

the arguments to these methods have not changed, just their names. and the
new methods became available in Rails 4, so we can start using them now

and prevent someone from doing old-style in the future

Change-Id: I61aa5512995dc8f25f3f7bd009a6cfa0a030e274
Reviewed-on: https://gerrit.instructure.com/101401
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2017-02-09 23:03:40 +00:00
James Williams a9fab4f4af remove strong_params
refs #CNVS-32574

Change-Id: I4e255b989f8ad3fc6ec2f2699d4950dc0e5a419a
Reviewed-on: https://gerrit.instructure.com/99483
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2017-01-13 12:49:15 +00:00
James Williams 1788c8b9be make values from WeakParameters also weak
refs #CNVS-32574

Change-Id: I64654de0e09866e2cbb5546734081bf2cb6f4491
Reviewed-on: https://gerrit.instructure.com/92892
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-10-19 12:54:33 +00:00
James Williams 440daa4a87 use strong params, part A
refs #CNVS-32574

Change-Id: I2785c562c33980a7e230296c200538b8bb0ca6b5
Reviewed-on: https://gerrit.instructure.com/92728
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-10-14 16:17:26 +00:00
Cody Cutrer 5db6b6c436 remove move_question
it's never used; only the move multiple endpoint is

Change-Id: Idf481693e18a2e0531479a47be8733c2e15d1b78
Reviewed-on: https://gerrit.instructure.com/31481
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-03-07 17:47:12 +00:00
Cody Cutrer 65da18174e improve acts_as_list
fixes CNVS-9622

basically, stop with the assumption that lists must be contiguous,
so that we don't have to keep compacting them all the time. allows
for far simpler queries adding things to lists.

test plan:
 * regression test on lists - files, context modules, assignments,
   etc.
 * basically make sure that adding new items puts them in the same
   spot as it did before (bottom of list?), and that reordering
   still works

Change-Id: I31c9ad4ed9b7db2b23e032617d4a01611c8e3c03
Reviewed-on: https://gerrit.instructure.com/26709
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2013-12-17 19:55:43 +00:00
Josh Simpson b5b627efa6 Quiz question refactor / api implementation
fixes CNVS-7982
Changes parsing mechanisms for question data, and adds
API for quiz questions.

Change-Id: I483fc9c4718af50e1bed2ee3547905f857de6285
Reviewed-on: https://gerrit.instructure.com/25346
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Josh Simpson <jsimpson@instructure.com>
2013-11-22 17:03:45 +00:00
Jacob Fugal b12791aa99 to_json unnecessary (and wrongish) in render :json
refs CNVS-7597

render :json => thing will call ActiveSupport::JSON.encode(thing) unless
thing is a String. ActiveSupport::JSON.encode(thing) just calls
thing.to_json but with some circular reference checking that we want. we
may also want enhance ActiveSupport::JSON.encode to do additional
processing, and calling to_json straight up would bypass that.

in the cases where we do need to do the structural transformation before
passing to render :json (e.g. because of need to pass arguments), use
as_json to do structural transformation only, vs. to_json that does
serialization of the as_json result.

adds a rake task to lint the controllers to enforce as_json over to_json
in render json calls.

test-plan: heavy regression testing; no end behavior should change
(except a pair of serialization bugs that got fixed)

Change-Id: I7a91a9fe0eca70456bc5bca233f0ed6b27a54aaf
Reviewed-on: https://gerrit.instructure.com/23650
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-10-02 18:05:22 +00:00
Jon Jensen b2b21a794b account-level question banks, closes #5025
phased out AssessmentQuestion#context, did some ground work for #5026
and #5027

Change-Id: Ice4567a0f069dd49da8ce57bf0c8325b0b062115
Reviewed-on: https://gerrit.instructure.com/5303
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-08-29 16:24:49 -06:00
Cody Cutrer 3404788721 only create one version per create/update of AssessmentQuestion
refs #4189

Change-Id: Ic96b542dfb441e8f1da85a6c784ccc8fbc33023c
Reviewed-on: https://gerrit.instructure.com/3949
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-05-31 15:54:43 -06:00
Zach Wily 20092fb2c9 fix more find_by_id cases where we could pass in an empty string
Change-Id: I6bd72dd78f739edac6377f863f298fa14283be38
Reviewed-on: https://gerrit.instructure.com/3299
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-04-27 10:45:09 -06:00
Brian Whitmer 8b8173dcc9 Initial commit.
closes #6988138
2011-01-31 18:57:29 -07:00