Commit Graph

10 Commits

Author SHA1 Message Date
Strand McCutchen d6597c107c fix Style/EmptyLineBetweenDefs issue
Change-Id: Ib7b824043a7ac9196f06020e2ca42fe983565f0d
fixes: CNVS-20009
Reviewed-on: https://gerrit.instructure.com/52919
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Strand McCutchen <smccutchen@instructure.com>
QA-Review: Strand McCutchen <smccutchen@instructure.com>
2015-04-29 16:28:39 +00:00
Cody Cutrer 9834937c8c don't autorequire a bunch of gems that are rarely used
Change-Id: I09ed3686629b62849d392684d587f30cb2047013
Reviewed-on: https://gerrit.instructure.com/51853
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-04-09 18:47:50 +00:00
Cody Cutrer 9c1e2a539c clean up render :action/:template calls
specific forms of :template were deprecated, and you don't even
need to specify that as the option (it's the default first
argument)

Change-Id: I8db2860cdaf46b105b2f981ed3e0bd923af4ef89
Reviewed-on: https://gerrit.instructure.com/51389
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2015-04-01 20:27:50 +00:00
Cody Cutrer 1522718bfb no more dynamic finders (controllers)
refs CNVS-15126

Change-Id: Icdea762c810c541d99c30922ee92d6c36686e1fa
Reviewed-on: https://gerrit.instructure.com/39670
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-09-17 02:42:30 +00:00
Jacob Fugal daf6143e0b session_affects_permissions -> permissions_key
fixes CNVS-13711

test-plan:
 - regression tests of:
   * permissions of admin with pending invitation to a course
   * user that typically would not have access to a portfolio, but
     visited the portfolio with a verifier string earlier in the session
     (but has no verifier string now)
   * access to attachments on the safe file domain

Change-Id: Ie321c77655e6ba5e87fd35a079086a48608f5d0e
Reviewed-on: https://gerrit.instructure.com/38029
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Nick Cloward <ncloward@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2014-07-30 16:16:18 +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
Mark Ericksen 87f68ffa42 improve error handling for ePortfolio section editing
fixes CNVS-5727

testing steps:
- on an ePortfolio page, click "Organize Sections"
  to add a new section.
  - blank out the name and hit enter (nothing happens)
    you should now be able to set some valid text and
    save it. (previously it would not save valid text
    until refreshing the page)
  - set a name that is too long (> 255 chars) and
    verify a popup/alert message reports that the name
    is too long and the invalid entry is removed from
    the page
- editing an existing section
  - clearing the name and trying to save (nothing
    happens) then setting to something should now save
  - set a name that is too long (> 255 chars) and
    verify that an error message is displayed on the
    section name input with a meaningful error message

Change-Id: I04dfab3cd741c4b04c5f8b2990aee8216aa34d7f
Reviewed-on: https://gerrit.instructure.com/24164
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-09-11 20:36:14 +00:00
Jacob Fugal c7f11399a2 eportofolio verifier behavior needs :session_affects_permissions
fixes #5756

Change-Id: I06e7e408c697853f538eca44a1dd0ee7eca7e03f
Reviewed-on: https://gerrit.instructure.com/5816
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-09-26 13:04:25 -06:00
Jacob Fugal e0e09bfea1 localize ePortfolios
Change-Id: If79d2b7e219ba4855d1a441e3fc7de2d8da0fad3
Reviewed-on: https://gerrit.instructure.com/4152
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-06-24 13:17:25 -06:00
Brian Whitmer 8b8173dcc9 Initial commit.
closes #6988138
2011-01-31 18:57:29 -07:00