Commit Graph

6 Commits

Author SHA1 Message Date
Xander Moffatt 0604ccab10 basic outcomes: return short error code on failure
why:
* error descriptions in the basic outcomes response are sometimes
translated and can't be relied on for parsing

* includes new ext_canvas_error_code XML attribute when request fails,
in both normal and quizzes response
* skips a test that succeeds in rspec but fails in flakey_spec_catcher,
and is unrelated to this change

closes INTEROP-7084
flag=none

test plan:
* set up the lti_example tool for grade passback (see
doc/lti_manual/11_testing.md#1.1_Basic_Outcomes for details)
* create a situation that will cause the grade passback to error: edit
the assignment to have no points possible, remove the user from the
course, pass no score or a score greater than 1, etc
* submitting that passback should show you the response XML in the tool
window
* the response XML should have the ext_canvas_error_code XML attribute
inside in the header -> response header info -> status info node.
* the value of this XML node should be an untranslated short string

Change-Id: I82c3185bb329efd9e35f21fa8f626d98c47c12ba
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/265244
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Evan Battaglia <ebattaglia@instructure.com>
Product-Review: Karl Lloyd <karl@instructure.com>
2021-11-18 21:15:26 +00:00
Cody Cutrer c65d57737a RuboCop: Layout lib
Change-Id: I0655d9a9d750f2debd6378b03d8ddc1403ebc31b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274158
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-09-22 20:01:52 +00:00
Cody Cutrer 06763dd519 add # frozen_string_literal: true for lib
Change-Id: I59b751cac52367a89e03f572477f0cf1d607b405
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251155
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-10-27 20:49:50 +00:00
Weston Dransfield 278682f152 Revert "Revert "Accept signed JWT tokens as the sourcedid for basic outcomes""
This reverts commit 50e604a8a9.

Change-Id: Ib9b403abe9dbfa5ba1468bd86317d210687b33c0
Reviewed-on: https://gerrit.instructure.com/133324
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
Tested-by: Jenkins
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2017-11-29 21:45:46 +00:00
Weston Dransfield 50e604a8a9 Revert "Accept signed JWT tokens as the sourcedid for basic outcomes"
This reverts commit 57a70424f5.

Change-Id: Id4f590f720423b1cbe873590466a42f06f440e07
Reviewed-on: https://gerrit.instructure.com/133150
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
2017-11-17 16:02:55 +00:00
Brad Humphrey 57a70424f5 Accept signed JWT tokens as the sourcedid for basic outcomes
Add sourcedid class

load sourcedid from token with validation

this supports both jwt and legacy sourcedids

use sourcedid class in in basic_outcomes

Test Plan:
  - Execute an LTI basic outcomes request
  - It should update grades and/or create a submission in canvas
  - It should still use the OLD sourced_ids (i.e.
    %r{^(\d+)-(\d+)-(\d+)-(\d+)-(\w+)$})
  - Enable the "Encrypted Sourcedids for Basic Outcomes"
    on the root account.
  - Execute an LTI baic outcomes request
  - It should use the NEW sourcdids (an encrypted JWT)
  - It should update grades ando/or create a submisison in canvas

refs PLAT-2747

Change-Id: I1b6223611228c8a078bcfa73976329365ebb1b7c
Reviewed-on: https://gerrit.instructure.com/128167
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2017-11-06 16:55:03 +00:00