Commit 38fde15 1 parent 282edcd commit 38fde15 Copy full SHA for 38fde15
File tree 1 file changed +21
-0
lines changed
1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,27 @@ class ConnectController extends Controller
82
82
}
83
83
```
84
84
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
+
85
101
### Sample app
86
102
87
103
[ 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 )
You can’t perform that action at this time.
0 commit comments