Izumi-kun / LTI-Tool-Provider-Library-PHP

LTI Tool Provider library for PHP
Apache License 2.0
21 stars 6 forks source link

Add missing Outcome result data #14

Open hug963 opened 6 years ago

hug963 commented 6 years ago

There is currently no way to attach a result data to an outcome. This adds that feature. :)

dac514 commented 5 years ago

Late to the party here but I am looking at this code today.

Source: https://www.edu-apps.org/extensions/result_data.html

It feels to me there's some code missing?

If you look at the top of \IMSGlobal\LTI\ToolProvider\ResourceLink::doOutcomesService you'll see code like:

$urlLTI11 = $sourceResourceLink->getSetting('lis_outcome_service_url');
$urlExt = $sourceResourceLink->getSetting('ext_ims_lis_basic_outcome_url');

Which is used as a condition to check if \<resultRecord> should be printed.

IMHO, you should add ext_outcome_data_values_accepted to \IMSGlobal\LTI\ToolProvider\ToolProvider::$LTI_RESOURCE_LINK_SETTING_NAMES

And check \<resultData> against it?