Skip to content

Commit

Permalink
Merge pull request #74 from openequella/gdprcompliance
Browse files Browse the repository at this point in the history
added privacy provider, including lti launch details
  • Loading branch information
edalex-ian authored Mar 20, 2020
2 parents a6ba6a0 + 44fb9b7 commit 4b56ec0
Show file tree
Hide file tree
Showing 4 changed files with 107 additions and 2 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2020-03-13 Nick Charles

GDPR compliance

2020-03-11 Nick Charles

Replace starburst icons with open sourced versions
Expand Down
90 changes: 90 additions & 0 deletions classes/privacy/provider.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
<?php

namespace mod_equella\privacy;

use core_privacy\local\metadata\collection;
use core_privacy\local\request\approved_contextlist;
use core_privacy\local\request\approved_userlist;
use core_privacy\local\request\context;
use core_privacy\local\request\contextlist;
use core_privacy\local\request\userlist;

defined('MOODLE_INTERNAL') || die();

class provider implements
\core_privacy\local\metadata\provider,
\core_privacy\local\request\core_userlist_provider,
\core_privacy\local\request\plugin\provider {

/**
* Returns meta data about this system.
*
* @param collection $collection The initialised collection to add items to.
* @return collection A listing of user data stored through this system.
*/
public static function get_metadata(collection $collection) : collection {

$collection->add_external_location_link('lti_client', [
'userid' => 'privacy:metadata:lti_client:userid',
'roles' => 'privacy:metadata:lti_client:roles',
'fullname' => 'privacy:metadata:lti_client:fullname',
'givenname' => 'privacy:metadata:lti_client:givenname',
'familyname' => 'privacy:metadata:lti_client:familyname',
'email' => 'privacy:metadata:lti_client:email',

], 'privacy:metadata:lti_client');

return $collection;

}

/**
* Get the list of contexts that contain user information for the specified user.
*
* @param int $userid The user to search.
* @return contextlist $contextlist The contextlist containing the list of contexts used in this plugin.
*/
public static function get_contexts_for_userid(int $userid) : contextlist {
return new contextlist();
}

/**
* Get the list of users who have data within a context.
*
* @param userlist $userlist The userlist containing the list of users who have data in this context/plugin combination.
*/
public static function get_users_in_context(userlist $userlist) {
}

/**
* Export all user data for the specified user, in the specified contexts.
*
* @param approved_contextlist $contextlist The approved contexts to export information for.
*/
public static function export_user_data(approved_contextlist $contextlist) {
}

/**
* Delete all data for all users in the specified context.
*
* @param context $context The specific context to delete data for.
*/
public static function delete_data_for_all_users_in_context(\context $context) {
}

/**
* Delete all user data for the specified user, in the specified contexts.
*
* @param approved_contextlist $contextlist The approved contexts and user information to delete information for.
*/
public static function delete_data_for_user(approved_contextlist $contextlist) {
}

/**
* Delete multiple users within a single context.
*
* @param approved_userlist $userlist The approved context and user information to delete information for.
*/
public static function delete_data_for_users(approved_userlist $userlist) {
}
}
13 changes: 12 additions & 1 deletion lang/en/equella.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,4 +164,15 @@
$string['push.attachment'] = 'Selected attachment';
*/

$string['webserviceerror'] = '{$a}';
$string['webserviceerror'] = '{$a}';

////////////////////////////////////////////////////////
// GDPR compliance

$string['privacy:metadata:lti_client'] = 'In order to integrate with a remote openEQUELLA LTI service, user data needs to be exchanged with that service. Contact your openEQUELLA administrator for more information.';
$string['privacy:metadata:lti_client:userid'] = 'The userid is sent from Moodle to allow you to access your data on the remote system.';
$string['privacy:metadata:lti_client:givenname'] = 'Your given name is sent to the openEQUELLA system for SSO login';
$string['privacy:metadata:lti_client:familyname'] = 'Your family name is sent to the openEQUELLA system for SSO login';
$string['privacy:metadata:lti_client:fullname'] = 'Your full name is sent to the openEQUELLA system for SSO login';
$string['privacy:metadata:lti_client:email'] = 'Your email address is sent to the openEQUELLA system for SSO login';
$string['privacy:metadata:lti_client:roles'] = 'Your Moodle roles are sent to the openEQUELLA system, which allows you to access your data on the remote system.';
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
defined('MOODLE_INTERNAL') || die();

$plugin->version = 2020031100;
$plugin->version = 2020031301;
$plugin->requires = 2014041101; // Requires this Moodle version
$plugin->component = 'mod_equella'; // Full name of the plugin (used for diagnostics)
$plugin->release = '1.0';

0 comments on commit 4b56ec0

Please sign in to comment.