Permalink
Browse files

Merge branch 'MDL-62456_34' of git://github.com/markn86/moodle into M…

…OODLE_34_STABLE
  • Loading branch information...
dmonllao committed May 16, 2018
2 parents 4c2a5ce + d5f69f0 commit 2f3bcbc5ce3c56aab49eeda1c19f7985a4cbd1a8
Showing with 36 additions and 1 deletion.
  1. +19 −0 mod/lti/classes/privacy/provider.php
  2. +13 −0 mod/lti/lang/en/lti.php
  3. +4 −1 mod/lti/tests/privacy_provider_test.php
@@ -49,6 +49,25 @@ class provider implements
* @return collection the updated collection of metadata items.
*/
public static function get_metadata(collection $items) : collection {
$items->add_external_location_link(
'lti_provider',
[
'userid' => 'privacy:metadata:userid',
'username' => 'privacy:metadata:username',
'useridnumber' => 'privacy:metadata:useridnumber',
'firstname' => 'privacy:metadata:firstname',
'lastname' => 'privacy:metadata:lastname',
'fullname' => 'privacy:metadata:fullname',
'email' => 'privacy:metadata:email',
'role' => 'privacy:metadata:role',
'courseid' => 'privacy:metadata:courseid',
'courseidnumber' => 'privacy:metadata:courseidnumber',
'courseshortname' => 'privacy:metadata:courseshortname',
'coursefullname' => 'privacy:metadata:coursefullname',
],
'privacy:metadata:externalpurpose'
);
$items->add_database_table(
'lti_submission',
[
@@ -356,7 +356,16 @@
$string['preferwidth'] = 'Preferred width';
$string['press_to_submit'] = 'Press to launch this activity';
$string['privacy'] = 'Privacy';
$string['privacy:metadata:courseid'] = 'The ID of the course the user is accessing the LTI Consumer from';
$string['privacy:metadata:courseidnumber'] = 'The ID number of the course the user is accessing the LTI Consumer from';
$string['privacy:metadata:coursefullname'] = 'The fullname of the course the user is accessing the LTI Consumer from';
$string['privacy:metadata:courseshortname'] = 'The shortname of the course the user is accessing the LTI Consumer from';
$string['privacy:metadata:createdby'] = 'The user who created the record';
$string['privacy:metadata:email'] = 'The email address of the user accessing the LTI Consumer';
$string['privacy:metadata:externalpurpose'] = 'The LTI Consumer provides user information and context to the LTI Tool Provider.';
$string['privacy:metadata:firstname'] = 'The firstname of the user accessing the LTI Consumer';
$string['privacy:metadata:fullname'] = 'The fullname of the user accessing the LTI Consumer';
$string['privacy:metadata:lastname'] = 'The lastname of the user accessing the LTI Consumer';
$string['privacy:metadata:lti_submission'] = 'LTI submission';
$string['privacy:metadata:lti_submission:datesubmitted'] = 'The timestamp indicating when the submission was made';
$string['privacy:metadata:lti_submission:dateupdated'] = 'The timestamp indicating when the submission was modified';
@@ -367,8 +376,12 @@
$string['privacy:metadata:lti_tool_proxies:name'] = 'LTI proxy name';
$string['privacy:metadata:lti_types'] = 'LTI types';
$string['privacy:metadata:lti_types:name'] = 'LTI type name';
$string['privacy:metadata:role'] = 'The role in the course for the user accessing the LTI Consumer';
$string['privacy:metadata:timecreated'] = 'The date at which the record was created';
$string['privacy:metadata:timemodified'] = 'The date at which the record was modified';
$string['privacy:metadata:userid'] = 'The ID of the user accessing the LTI Consumer';
$string['privacy:metadata:useridnumber'] = 'The ID number of the user accessing the LTI Consumer';
$string['privacy:metadata:username'] = 'The username of the user accessing the LTI Consumer';
$string['quickgrade'] = 'Allow quick grading';
$string['quickgrade_help'] = 'If enabled, multiple tools can be graded on one page. Add grades and comments then click the "Save all my feedback" button to save all changes for that page.';
$string['redirect'] = 'You will be redirected in few seconds. If you are not, press the button.';
@@ -43,7 +43,10 @@ public function test_get_metadata() {
$collection = new collection('mod_lti');
$newcollection = provider::get_metadata($collection);
$itemcollection = $newcollection->get_collection();
$this->assertCount(3, $itemcollection);
$this->assertCount(4, $itemcollection);
$ltiproviderexternal = array_shift($itemcollection);
$this->assertEquals('lti_provider', $ltiproviderexternal->get_name());
$ltisubmissiontable = array_shift($itemcollection);
$this->assertEquals('lti_submission', $ltisubmissiontable->get_name());

0 comments on commit 2f3bcbc

Please sign in to comment.