These are some minor tweaks needed to obtain Tool Provider Certification via the official IMS Global testing harness. A Patch will be included here to achieve this. They are very minor changes involving correct handling of error reporting and data validation.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

btopro’s picture

Status: Active » Needs review
FileSize
4.56 KB

Patch checks for:
if its a good message
if its the correctly reported LTI version (not just if it has one)
adds roles for "Else" and "Alumni" which the harness has in its testing capabilities
report back to the launch_presentation_return_url if there is an error reported based on ill-formed message
context_id is not actually required for a launch based on the way the spec is formed through LTI Tool provider was enforcing it (commented out)

btopro’s picture

fixed some notices, passed testing for 1.0 and 1.2 (draft) using this. I couldn't figure out the outcomes part of this module so didn't pass outcomes / 1.1.

darrenwh’s picture

Just a few coding standard things here...

  1. +++ b/lti_tool_provider.module
    @@ -751,4 +753,4 @@ function lti_tool_provider_consumer_access($op, $item = NULL, $account = NULL) {
    \ No newline at end of file
    

    Newline missing at end of file

  2. +++ b/lti_tool_provider.operations.inc
    @@ -48,19 +58,24 @@ function lti_tool_provider_launch() {
    -  if (empty($launch_info['context_id'])) {
    +  /*if (empty($launch_info['context_id'])) {
         if (isset($launch_info['launch_presentation_return_url'])) {
           lti_tool_provider_goto(url($launch_info['launch_presentation_return_url'], array('query' => array('lti_errormsg' => t('Error: Invalid context, No context Id.')))));
         }
         else {
           return t('Error: Invalid context, No context Id.');
         }
    -  }
    

    This block of code should be just deleted not commented out

  3. +++ b/lti_tool_provider_memberships/lti_tool_provider_memberships.module
    @@ -911,18 +911,25 @@ function lti_tool_provider_memberships_lti_tool_provider_launch_alter(&$launch_i
    +  // can't assume context_id isset, not required by IMS specification
    

    Missing period at end of comment, Capital at beginning.

  4. +++ b/lti_tool_provider_outcomes/lti_tool_provider_outcomes.module
    @@ -763,4 +766,4 @@ function lti_tool_provider_outcomes_lti_tool_provider_memberships_get_alter(&$me
    \ No newline at end of file
    

    Missing newline at end of file.

darrenwh’s picture

Status: Needs review » Needs work
kenianbei’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev