1 |
efrain |
1 |
LTI Tool Provider Library PHP
|
|
|
2 |
=============================
|
|
|
3 |
|
|
|
4 |
Some changes from the upstream version have been made:
|
|
|
5 |
* Define consumer profile member variable for ToolConsumer class
|
|
|
6 |
* Added context type property for Context class
|
|
|
7 |
* Set context type if 'context_type' parameter was submitted through POST
|
|
|
8 |
* Do not require tool_consumer_instance_guid
|
|
|
9 |
* Prevent modification of the request to the provider
|
|
|
10 |
These changes can be reverted once the following pull requests have been integrated upstream:
|
|
|
11 |
* https://github.com/1EdTech/LTI-Tool-Provider-Library-PHP/pull/10
|
|
|
12 |
* https://github.com/1EdTech/LTI-Tool-Provider-Library-PHP/pull/11
|
|
|
13 |
* https://github.com/1EdTech/LTI-Tool-Provider-Library-PHP/pull/47
|
|
|
14 |
* https://github.com/1EdTech/LTI-Tool-Provider-Library-PHP/pull/48
|
|
|
15 |
|
|
|
16 |
This local changes can be reverted once it's checked that they are present upstream (note the
|
|
|
17 |
LTI-Tool-Provider-Library-PHP repo has been archived so it doesn't accept pull requests anymore):
|
|
|
18 |
* MDL-67034 php74 compliance fixes
|
|
|
19 |
* MDL-71920: Migrated from curl_exec and friends to use our Moodle curl wrapper,
|
|
|
20 |
so we can better handle site security settings
|
|
|
21 |
|
|
|
22 |
This local change has been made without the accompanying pull request as the upstream library is archived:
|
|
|
23 |
* $FULLME is used as the URL for OAuth, to fix reverse proxy support (see MDL-64152)
|
|
|
24 |
|
|
|
25 |
It is recommended by upstream to install depdencies via composer - but the composer installation is bundled
|
|
|
26 |
with an autoloader so it's better to do it manually.
|
|
|
27 |
|
|
|
28 |
Information
|
|
|
29 |
-----------
|
|
|
30 |
|
|
|
31 |
URL: https://github.com/1EdTech/LTI-Tool-Provider-Library-PHP/wiki
|
|
|
32 |
License: Apache License, Version 2.0
|
|
|
33 |
|
|
|
34 |
Installation
|
|
|
35 |
------------
|
|
|
36 |
|
|
|
37 |
1) Download the latest version of the provider library
|
|
|
38 |
wget https://github.com/1EdTech/LTI-Tool-Provider-Library-PHP/archive/3.0.3.zip
|
|
|
39 |
|
|
|
40 |
2) Unzip the archive
|
|
|
41 |
unzip 3.0.3.zip
|
|
|
42 |
|
|
|
43 |
3) Move the source code directory into place
|
|
|
44 |
mv LTI-Tool-Provider-Library-PHP-3.0.3/* lib/ltiprovider/
|
|
|
45 |
|
|
|
46 |
4) Updates
|
|
|
47 |
Check that the following pull request is included in the release.
|
|
|
48 |
Then remove this step from this file.
|
|
|
49 |
https://github.com/1EdTech/LTI-Tool-Provider-Library-PHP/pull/13
|
|
|
50 |
If not, apply manually.
|
|
|
51 |
|
|
|
52 |
5) Run unit tests on enrol_lti_testsuite
|
|
|
53 |
|
|
|
54 |
Upgrading Notes
|
|
|
55 |
---------------
|
|
|
56 |
|
|
|
57 |
Check if there are any new changes to the database schema. To do this, view the logs
|
|
|
58 |
since the last release for the data connector base class and the mysql data connector.
|
|
|
59 |
|
|
|
60 |
https://github.com/1EdTech/LTI-Tool-Provider-Library-PHP/compare/3.0.2...3.0.3
|
|
|
61 |
|
|
|
62 |
src/ToolProvider/DataConnector/DataConnector.php
|
|
|
63 |
src/ToolProvider/DataConnector/DataConnector_mysql.php
|
|
|
64 |
|
|
|
65 |
In case of any changes we may need to update
|
|
|
66 |
|
|
|
67 |
enrol/lti/classes/data_connector.php
|
|
|
68 |
enrol/lti/db/install.xml
|
|
|
69 |
enrol/lti/db/upgrade.php
|
|
|
70 |
|
|
|
71 |
* MDL-78144 PHP 8.2 compliance.
|
|
|
72 |
To temporarily prevent the PHP 8.2 warning about the deprecation of dynamic properties,
|
|
|
73 |
the #[\AllowDynamicProperties] attribute was added on top of the classes.
|
|
|
74 |
Below is a handy command to add the attribute above the class line:
|
|
|
75 |
```
|
|
|
76 |
cd lib/ltiprovider/src
|
|
|
77 |
for file in `find . -name '*.php' `; do sed -i '/^class /i #[\\AllowDynamicProperties]' $file; done
|
|
|
78 |
```
|