Commit Graph

44 Commits

Author SHA1 Message Date
Nathan Mills 7fb13337af don't change submission type for grade updates
fixes: PLAT-1836

test plan:
1. Install this tool into a Canvas course:
https://lti-tool-provider.herokuapp.com
2. Create and publish an assignment that uses the external tool from #1
3. Enroll and masquerade as a student and access the assignment
4. Submit either text or url (or a valid LTI launch URL)
5. view the submission details (grades --> click the assignment), notice
your submission is previewable
6. view the submissions API and notice the submission_type is
"online_upload"
7. return to the assignment and give yourself a grade
8. make sure that the assignment is still previewable and that the
submission_type didn't change

Change-Id: Ibdd2fbafb54f80d20dff447ec7f2b776eee419bb
Reviewed-on: https://gerrit.instructure.com/91100
Tested-by: Jenkins
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2016-09-27 17:51:44 +00:00
Andrew Butterfield 7731dbf37f Fix Basic Outcome for IMS LTI Certification
fixes PLAT-1767, PLAT-1773, PLAT-1774, PLAT-1775, PLAT-1776, PLAT-1777

Test plan:
* Regression test basic outcomes service
* Ensure that in each <imsx_POXBody> there is a corresponding

  <replaceResultResponse/>

  <deleteResultResponse/>

  <readResultResponse>
    <result>
      <resultScore>
        <language>en</language>
        <textString>0.91</textString>
      </resultScore>
    </result>
  </readResultResponse>

  depending on the kind of request being made

Change-Id: If049bd5380b60ab4fc7b309cffd14d4a78595090
Reviewed-on: https://gerrit.instructure.com/88811
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Andrew Butterfield <abutterfield@instructure.com>
2016-08-26 20:38:08 +00:00
Ryan Taylor 646a16b255 Fix speedgrader LTI integration bugs
1) Respect global context in URL lookups
2) Update submission_type when replacing previous submission

Closes PLAT-1623

Test Plan:
 - Speedgrader integrations should load without error
 - Cross-sharded speedgrading should load properly

Change-Id: I9ed6d6f629d6af9c03a5fe4d13aded771ff17f61
Reviewed-on: https://gerrit.instructure.com/83476
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Reviewed-by: Davis McClellan <dmcclellan@instructure.com>
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Tested-by: Jenkins
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
2016-06-27 22:19:11 +00:00
Brad Humphrey e7229f0fc8 allow basic outcomes to accept an lti link with no score
fixes PLAT-1617

Change-Id: I8206a13fe30095a5c85b2e20dd704f040c14c95a
Reviewed-on: https://gerrit.instructure.com/83200
Tested-by: Jenkins
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
2016-06-23 18:37:24 +00:00
Ryan Taylor 167b46924a Add LTI launch capability to speedgrader
Closes CNVS-29144

Test Plan:
   - Add an external tool assignment
   - Passback a URL type score which matches the launch URL of the tool
   - Confirm that speedgrading that page launches into the tool

Change-Id: Iff3e00ece10c6b4ff891e4af90053c88a677db6a
Reviewed-on: https://gerrit.instructure.com/79526
Reviewed-by: Davis McClellan <dmcclellan@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2016-05-24 21:14:02 +00:00
James Williams 12bd2627ab remove float rounding monkey-patch
used to turn 1.0.to_s to "1"

closes #CNVS-28310

Change-Id: I79106a4c0b42fe9b6d96097aaf9dd28a43024373
Reviewed-on: https://gerrit.instructure.com/75194
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2016-04-22 18:17:18 +00:00
Nathan Mills e893a488c8 gracefully handle missing sourcedid for grade passback
fixes PLAT-1356

test plan:
send a grade passback with no sourcedid
canvas shouldn't return a 500

Change-Id: I21436d679e05a5fa837167b163212a729c10a3a8
Reviewed-on: https://gerrit.instructure.com/72998
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2016-02-26 18:29:52 +00:00
Nathan Mills fbb91fdfcd allow tii lti originality scores to be resubmitted
if there is already a submission for grade passback
then keep the original submission_type

fixes PLAT-1313

test plan:
setup the turnitin lti tool and submit an assignmnet
wait until you get an originality score back
edit the db to change the status of the result to error
resubmit the assignment in speed grader
you should get the score again, and the status in the db should change
then go into turnitin as a teacher and submit a grade for the submission
check the database the submission_type should still be 'online_upload'

Change-Id: I2bc609bc5559e80f678cf00370f6a04af4d3b6aa
Reviewed-on: https://gerrit.instructure.com/71118
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
Tested-by: Jenkins
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2016-02-16 19:37:31 +00:00
Nathan Mills 894c849a28 fix bad returns for decode_source_id
fixes PLAT-1303

test plan:

grade passback should still work

Change-Id: I48f841b51e21e5f5c3cc5d55d8193374c97dd115
Reviewed-on: https://gerrit.instructure.com/69806
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2016-01-27 18:05:18 +00:00
Brad Horrocks 020e580830 Better error logs and responses for grade passback
This adds error reports for failed/unsupported outcomes

Fixes PLAT-1278

Test Plan:
TBD... Any sugestions

Change-Id: Ie29f5e92735d73268f9221bdba73d1ef7af87758
Reviewed-on: https://gerrit.instructure.com/66083
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
2015-11-05 22:49:25 +00:00
Brad Horrocks ff5dd90527 Capture better errors for failed grade passback
This adds oauth info to captured error exceptions

Fixes PLAT-1256

Test Plan:
The error report should include all of the OAuth1 header information
If the Authorization Header is not OAuth1 it should not include it
The error report should also include the signature canvas generates
The error report should include where the authorization failed. i.e.
signature, nonce, expiration

The best way to test this is run the test :D
The best way to manually test this:
- Setup an LTI Tool (I used the example tool with all the checkboxes
  checked)
- Use post man stand alone
- create a new request to "/api/lti/v1/tools/<tool_id>/grade_passback"
- Use post man's Authorization tab to setup OAuth1
- Use the tools key and secret
- tweak settings for different failure tests
- select add params to header
- click update request
- send the request

You will need to manually change the auth header to get to some
failures. Let me know if you need help

Change-Id: If09882017eaae0ddff96d39b7f33c2da9c1a7fc8
Reviewed-on: https://gerrit.instructure.com/65944
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
2015-11-05 22:49:16 +00:00
Brad Humphrey 64ef3becc7 Allow LTI tools to submit scores for 0 point assignments
fixes PLAT-1238

Change-Id: I601a3c81b7b10c13467dca15b4fe251dd032be18
Reviewed-on: https://gerrit.instructure.com/64033
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
2015-09-25 21:29:59 +00:00
Brad Horrocks ad0275bf09 LTI grade passback correctly handles 0 point complete/incomplete assignments
when an assignment is worth 0 points. A score of 1.0 will be marked
as complete and anything less than 1.0 will be marked incomplete

Fixes PLAT-1095

Test Plan:
You'll need an LTI tool that uses grade passback
Use the external tool on an assignment with complete/incomplete as
the grading type.
Set the total points for the assignment to 0.
Make sure you can get a grade of "complete" after taking the assignment.

Change-Id: I911d22ec93ed223b79855ffe2c69fc0c94fa56f9
Reviewed-on: https://gerrit.instructure.com/59268
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
2015-07-28 17:54:18 +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
Nathan Mills ae99ccf7aa have grade passback do a more robust check for url matching
PLAT-818

test-plan:
install multiple tools with the same launch urls.
create assignments for each tool
attempt to do grade passback with the tools
they all should pass back a grade

Change-Id: I4a01b45eb2f1f1b0ed25ecc397ec4e978abc4a4e
Reviewed-on: https://gerrit.instructure.com/48913
Tested-by: Jenkins
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2015-02-19 21:06:13 +00:00
Nathan Mills 2ce0f083a8 fix multiple outcome submissions for assignments with no points possible
fixes PLAT-845

test-plan:
try and send grades back multiple times for an assignment with no points possible.  It shouldn't blow up

Change-Id: Id001a1d218931f127fd350a34f608ac4b246221f
Reviewed-on: https://gerrit.instructure.com/47955
Tested-by: Jenkins
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2015-02-02 20:47:13 +00:00
Bracken Mosbacker 3e5bcd4acc add resultTotalScore for LTI 1 outcome service
fixes CNVS-17784

Change-Id: Ie61a0f76220a38ed40465b07c22530b644933167
Reviewed-on: https://gerrit.instructure.com/46566
Tested-by: Jenkins
Reviewed-by: Alex Boyd <aboyd@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
Reviewed-by: Eric Berry <ericb@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
2015-01-27 17:59:08 +00:00
Brad Humphrey 6ec8bdb081 add better error messages to lti outcomes
test plan
 - Install an LTI tool with grade passback
 - Setup an assignment in a course for LTI grading

 - Delete the user enrollment and execute outcomes API call
   * It  should say 'User is no longer in course'

 - Delete the assignment and execute outcomes API call
   * It  should say 'Assignment is invalid'

 - Delete the tool and execute outcomes API call
   * It  should say 'Assignment is no longer associated with this tool'

 - Delete the course and execute outcomes API call
   * It  should say 'Course is invalid'

fixes PLAT-821

Change-Id: Ia058a14854bd107eeea6a28b77258ab197980e25
Reviewed-on: https://gerrit.instructure.com/46891
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: August Thornton <august@instructure.com>
2015-01-13 22:52:03 +00:00
Cody Cutrer 575e1d0acb security.yml encryption key rotation support
fixes CNVS-15647

test plan:
 * ensure that all of the following still work -
   * replying to an e-mail notification
   * displaying avatars
   * changing your avatar
   * uploading a file that's exempt from quota checks (i.e.
     submitting an assignment)
   * grade passback via LTI
   * add an object embed to a wiki page
 * rotate your encryption key -
   * in security.yml, move encryption_key to previous_encryption_keys,
     and put something else in encryption_key
 * repeat step 1, as much as possible using the original verifier
   from that step (i.e. reply to the original e-mail, refresh just
   the object embedded in the wiki page)

Change-Id: Id36bbb1711f8b6c6f960cc1e898b75e335bfac81
Reviewed-on: https://gerrit.instructure.com/41368
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2014-10-27 20:50:45 +00:00
Cody Cutrer 5d42d023d2 no more dynamic finders (lib)
refs CNVS-15126

Change-Id: I4087b1c2442c5b8f70ce2138bf4aeef6ef7e59cd
Reviewed-on: https://gerrit.instructure.com/41259
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-09-23 16:53:56 +00:00
Brad Humphrey ce66769b69 implement lti outbound adapter
also, refactor lti outbound adapter parameters and
convert integration tests to use lit outbound adapter

test plan
 - Ensure that LTI launch parameters are the same before and after this change.
 - Test all of the different kinds of launches for differences

Change-Id: I749e7f7b887eaac87dd104f195b526b18040a2b9
Reviewed-on: https://gerrit.instructure.com/30087
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
2014-03-26 16:49:22 +00:00
Stephan Hagemann ea7e45c793 WIP basic_lti_outbound gem extraction
Change-Id: Icb8f78bdd5f41e4eae18b30d1a4cfc7dd9942057
Reviewed-on: https://gerrit.instructure.com/28722
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Raphael Weiner <rweiner@pivotallabs.com>
Product-Review: Brad Humphrey <brad@instructure.com>
QA-Review: Brad Humphrey <brad@instructure.com>
2014-01-23 22:35:20 +00:00
Brad Humphrey 4923906d88 fixes a bug in the LTI variable substitutor
test plan:

Add a custom variable with the value $Canvas.user.user and $Canvas.user.class.
These values should not be substituted when the tool launches .

fixes PLAT-311

Change-Id: Ifb64ebaeb0c732720d6c5312cbc595a9c6e9c21e
Reviewed-on: https://gerrit.instructure.com/28761
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2014-01-21 15:58:26 +00:00
Cody Cutrer 2b9645e728 fix BLTI on Ruby 2.0
Change-Id: I5082e03729e5e6a902a7edd612a935770ae3f5c0
Reviewed-on: https://gerrit.instructure.com/27952
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2013-12-31 16:35:53 +00:00
Brad Humphrey 6a09d532b9 updating the variable substitution methodology
Test Plan:
 - Add a tool with variable substitution and anonymous privacy level
 - It should substitute all of the variables that it can based on the context

here is a list of the valid substitution variables:

$Canvas.api.domain
$Canvas.assignment.id
$Canvas.assignment.title
$Canvas.assignment.points_possible
$Canvas.context.id
$Canvas.context.sis_source_id
$Canvas.enrollment.enrollment_state
$Canvas.membership.concluded_roles
$Canvas.user.id
$Canvas.user.login_id
$Person.name.full
$Person.name.family
$Person.name.given
$Person.address.timezone

fixes PLAT-187

Change-Id: I53619e1888b768cd4e9c327a44b6597bb00c6195
Reviewed-on: https://gerrit.instructure.com/26366
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
2013-11-21 23:22:24 +00:00
Braden Anderson efe2e14dba lti: use asset_strings relative to tools in opaque identifiers
fixes CNVS-9030

test plan:
  * use an LTI tool as users on two different shards with the same IDs
  * verify that the two users get separate accounts in the LTI tool

Change-Id: I977cc13c11d6e0e39a2c184d350d52f25fe94d06
Reviewed-on: https://gerrit.instructure.com/26234
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
2013-11-19 23:50:32 +00:00
Brian Whitmer 331449d820 send selected text on LTI launch
test plan:

- Install a tool that uses the rich text editor
- Select some text in the editor
- Launch the tool
- Ensure that canvas sends a "text" param with the selected text

Change-Id: I267b07f3ec5033d84c11e52b873fc36011602198
Reviewed-on: https://gerrit.instructure.com/24909
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
2013-11-14 23:34:50 +00:00
Brad Humphrey fa699dd1c4 unit tests for lit outcomes replace result
now we only automatically grade assignments when a grade is passed back,
otherwise we leave them ungraded so that the teacher will be notified.

Test Plan:
 - Install a homework submission tool
 - Submit a grade via LTI
   * Ensure that the grade submits correctly
 - Submit a url without a grade
   * Ensure that the teacher is notified of the ungraded assessment
   * Ensure that the url is recorded for that submission
 - Submit text without a grade
   * Ensure that the teacher is notified of the ungraded assessment
   * Ensure that the text is recorded for that submission

Change-Id: Ic941c54062685ef1bba0aa860682db40cff952e3
Reviewed-on: https://gerrit.instructure.com/24474
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Adam Phillipps <adam@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
2013-10-01 21:19:51 +00:00
Cody Cutrer 22319f1402 use IANA timezone for LTI variable, and only in standard variable
* use IANA timezone names, not Rails weird names
 * don't send the offset (it will just be a source of bugs)
 * don't allow a custom variable name when a standard
   (http://www.imsglobal.org/LTI/v2p0pd2/uml/purl.imsglobal.org/vocab/lti/v2/variable/index.html)
   one will do just fine

Change-Id: I774a8b34b14507c6e65b1c1b144369ba09d50af3
Reviewed-on: https://gerrit.instructure.com/24665
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2013-09-25 22:03:01 +00:00
Bracken Mosbacker 609c7803af set the correct namespoce for lti grade service
We had some draft namespace which isn't valid anymore

Change-Id: Ic12b27d6bdad376c71442a6fe974b885bbc78035
Reviewed-on: https://gerrit.instructure.com/23058
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Bracken Mosbacker <bracken@instructure.com>
2013-08-06 18:09:30 +00:00
Bracken Mosbacker d1ecb63094 add lis_outcome_service_url to assignment launches for teachers
per the LTI spec the lis_outcome_service_url should always
be sent, and we were only sending it for students.

Test Plan:
 * Do an LTI assignment launch as a teacher or admin
 * Make sure the lis_outcome_service_url value is sent
 * Also check that the custom_canvas_assignment_title/points_possible are sent

closes CNVS-6392

Change-Id: If69875884029e5cba9fb329f09c21d2220fcdfd0
Reviewed-on: https://gerrit.instructure.com/21652
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
2013-06-24 22:36:31 +00:00
James Williams 01b4192045 add custom_time_zone parameter to lti launches
test plan:
* create a external tool with a custom field keys like:

custom_time_zone=$Person.address.timezone
custom_time_zone2=$Canvas.user.timezone
custom_offset=$Canvas.user.timezone.offset

* confirm that the tool launch parameters includes the
custom keys substituted with the current set time zone
or time zone offset (which derives from the user,
or the root account)

fixes #CNVS-6281

Change-Id: I9bf44f7ba10b2c7f68cae65496caba30ff601f15
Reviewed-on: https://gerrit.instructure.com/21621
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
2013-06-21 22:45:58 +00:00
Bracken Mosbacker 5a689faa6d add lti variable substitution support
Added a basic variable substitution framework and implemented
a few variables as examples: $Person.name.full,
$Person.name.given, $Person.name.family

Added a concluded enrollment roles variable so that a tool
can know what a users concluded roles were. The variable is
$Canvas.membership.concludedRoles

Variable names are case sensitive.

Test Plan:
 * Create an lti tool launch with a custom key like this:
   * custom_my_var=$Person.name.full
 * With a concluded user do a tool launch that has the
   $Canvas.membership.concludedRoles variable
	 * it should list the concluded roles
 * Configure tools through an XML file with a custom param
   and make sure it works

Change-Id: Iefb85c441680c7ab3623ce85e405e1c48cda837c
Reviewed-on: https://gerrit.instructure.com/21193
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
2013-06-07 15:49:47 +00:00
Zach Pendleton a576f7d836 fix lti passback for assignments with no points_possible.
fixes #10146

when using lti to pass back a grade on an assignment with no
points possible, a 500 was previously returned. now a proper
error response is returned and a submission is created with
a submission comment notifying the teacher of the attempted
grade and the error.

test plan:
  * create an assignment with no points possible and a
    grading_type of percent;
  * attempt to pass back a grade using an lti tool;
  * verify that a codeMajor of 'failure' is returned to the LTI
    tool with a description of "Assignment has no points
    possible";
  * verify that a submission is created with a submission comment
    that contains the attempted grade and an explanation of the
    error.

Change-Id: I4b7acd2a61f70e3a402c13dd0714601b745b2fb4
Reviewed-on: https://gerrit.instructure.com/14318
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
2012-10-11 17:09:38 -06:00
Bracken Mosbacker bf14f3b9ee add content passback extension to lti assignment launches
This creates an LTI extension to pass text or urls along
with the score when doing an LTI 1.1 outcome request.

Test Plan:
 * use a tool that supports this extension on an assignment
 * After doing the tool activity the submission should have the expected value

refs #mebipenny

Change-Id: I296df1e7c7d99af61724a904511f9bf63d5d2613
Reviewed-on: https://gerrit.instructure.com/12878
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-08-22 15:38:19 -06:00
Zach Pendleton 89d9970666 set submission_type on lti submissions. fixes #8734
set submission_type on lti submissions so that submitted_at
logic works properly and filters in gradebook function as
expected.

test plan:
  * create an external tool assignment with grade passback;
  * create a submission through the external tool;
  * in gradebook, "Message students who..." with the "Haven't
    submitted yet" filter and verify that the user with a
    submission is excluded.

Change-Id: I253b57e3edfa52d0960f889fc5ce5e03cd2bdf84
Reviewed-on: https://gerrit.instructure.com/10974
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-05-23 15:10:51 -06:00
Cody Cutrer 49ed24c5ae do LTI tool stuff relative to the tool's shard refs #6886
Change-Id: Ic9226050df8966d1dec5f2133e0eb8c0a35a1b52
Reviewed-on: https://gerrit.instructure.com/9389
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-03-26 09:18:32 -06:00
Brian Palmer 22de1808a2 implement blti extensions 0.0.4 outcome service, refs #5892
This older specification has the same semantics as the new official LTI
v1.1 outcome service specification, but there are a lot of differences
in request/response formatting.

Change-Id: I7cc4ce1e5888573fc6b2706356982926b84bed0f
Reviewed-on: https://gerrit.instructure.com/6749
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-11-08 08:25:20 -07:00
Brian Palmer 0e72be8bcf change to a more generic lti outcome service url scheme
refs #5892

according to the spec, this url shouldn't change for each
user/assignment, so we've refactored so that only the tool id is in the
url.

This involved some refactoring to include the user, course and
assignment in the sourcedid, rather than just the signature of those
values, and using those values to look up the objects.

As a consequence we now return "unsupported" rather than a 401 error if
the sourcedid is incorrect, which I think is more correct according to
the spec anyway.

Change-Id: I612d48cbd63b527d9f9209b858ebeca28ebe9202
Reviewed-on: https://gerrit.instructure.com/6699
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-11-08 08:25:07 -07:00
Brian Palmer a67b9af987 add deleteResult support to LTI grade passback, refs #5892
Canvas' implementation now passes all the certification tests for section 8,
"LTI 1.1: Suport for Basic Outcomes Service"

testplan: manually set up an assignment as an external_tool, then use
the certification app to verify that deleteResult works as expected.

Change-Id: Idf694d9e5a617a08ef11c5d803ed564de6af1250
Reviewed-on: https://gerrit.instructure.com/6679
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-11-04 09:42:35 -06:00
Brian Palmer b9b5409d39 add readResult support to LTI grade passback, refs #5892
testplan: you can set up an assignment as an external_tool type
manually, and then hit the IMS certification test tool to verify that
replaceResult and readResult are now fully supported.

Change-Id: Id193ba1943f51b3cb4b6a2d078d8a2262c26659e
Reviewed-on: https://gerrit.instructure.com/6678
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-11-04 09:42:23 -06:00
Brian Palmer c1957aac1a launch lti tool when viewing external_tool assignment
There isn't current any way to create this assignment type in the UI.
This just gets us far enough that we can test out the API functionality
against the IMS tests and some other tools that use grade passback.

refs #5892

Change-Id: I6f806a53bca0708702ff9e64e8e520be26234430
Reviewed-on: https://gerrit.instructure.com/6661
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-11-04 09:42:13 -06:00
Brian Palmer b66e8ba590 respond 'failure' not 'unsupported' for bad values in replaceResult
refs #5892

This also rejects values > 1.0, the LTI test suite specifically checks
for this. If we get a use case for a tool that wants to give extra
credit, we can re-evaluate.

Change-Id: I4894d8ae3b2fdcdb5eb3bae902ef934b34a632a3
Reviewed-on: https://gerrit.instructure.com/6658
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-11-03 08:54:03 -06:00
Brian Palmer 25d77ac15d add replaceResult support to LTI grade passback, refs #5892
Also versioned the URI and removed the tool_id param. As part of the
processing it pulls the tool from the assignment and verifies that it's
the same tool as was used to launch, by looking at the sourcedid.

Assignments now have an external_tool type and link to a
ContextExternalTool.

testplan: there isn't a way in the UI to configure an assignment as an
external tool yet, so it'll need to be manually configured in the
console.

Change-Id: I0cf5ec85d450409d6ea1ec71ce1d5d4c19622d4c
Reviewed-on: https://gerrit.instructure.com/6652
Reviewed-by: Brian Whitmer <brian@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-11-02 16:32:55 -06:00