Anonymization Of Learner Registration Data

Starting in the Bright for WordPress Plugin version 9.6, it is possible to override the default behavior of Bright in terms of user data associated with a registration created in SCORMCloud.

By default, the registration is created with:

  • a learner id corresponding to the user’s email address.
  • a first name matching the first name in the user’s WordPress account.
  • a last name matching the last name in the user’s WordPress account.
  • an email address corresponding the user’s email address. This enables the learner to launch and/or view their registration data directly from the SCORMCloud cloud.scorm.com website.

To override this behavior, define the following in a Javascript file loaded onto your page:

BrightPluggable.create_registration_data = function(data) {
  data.learner_id = bright_learner_id;
  data.fname = 'anonymous'
  data.lname = 'anonymous'
  data.remove_personal_data = true
  return data;
}

In this example, bright_learner_id is something that you define elsewhere in your page, for example via:

add_action('wp_footer', function () {
    $user_id = get_current_user_id();
    echo <<<EOF
<script>
  var bright_learner_id = {$user_id};
</script>
EOF;
});

In this case, we just use our WordPress user ID as the SCORMCloud learner_id.

Also note, you can override both the first name and last name. To suppress supplying the email address to SCORMCloud, set the remove_personal_data parameter to any value.