Skip to content

Commit 38fde15

Browse files
committed
Updated README.md
1 parent 282edcd commit 38fde15

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

+21
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,27 @@ class ConnectController extends Controller
8282
}
8383
```
8484

85+
### Outcome
86+
87+
```php
88+
/* @var Module $module */
89+
$module = Yii::$app->getModule('lti');
90+
91+
$user = User::fromRecordId(Yii::$app->session->get('userPk'), $module->toolProvider->dataConnector);
92+
93+
$result = '0.8';
94+
$outcome = new Outcome($result);
95+
96+
if ($user->getResourceLink()->doOutcomesService(ResourceLink::EXT_WRITE, $outcome, $user)) {
97+
Yii::$app->session->addFlash('success', 'Result sent successfully');
98+
}
99+
```
100+
85101
### Sample app
86102

87103
[https://github.com/Izumi-kun/yii2-lti-tool-provider-sample](https://github.com/Izumi-kun/yii2-lti-tool-provider-sample)
104+
105+
### Useful
106+
107+
- [LTI Tool Consumer emulator](http://lti.tools/saltire/tc)
108+
- [IMSGlobal/LTI-Tool-Provider-Library-PHP/wiki](https://github.com/IMSGlobal/LTI-Tool-Provider-Library-PHP/wiki)

0 commit comments

Comments
 (0)