Skip to content

Commit

Permalink
MDL-53832 enrol_lti: Support user images
Browse files Browse the repository at this point in the history
Original subtask MDL-55718.
  • Loading branch information
John Okely committed Oct 19, 2016
1 parent 8e0038f commit a618c70
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions enrol/lti/classes/tool_provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,10 @@ protected function onLaunch() {
}

// Update user image.
$image = false;
if (!empty($this->resourceLink->getSetting('user_image'))) {
$image = $this->resourceLink->getSetting('user_image');
} else if (!empty($this->resourceLink->getSetting('custom_user_image'))) {
if (isset($this->user) && isset($this->user->image) && !empty($this->user->image)) {
$image = $this->user->image;
} else {
// Use custom_user_image parameter as a fallback.
$image = $this->resourceLink->getSetting('custom_user_image');
}

Expand Down Expand Up @@ -363,7 +363,7 @@ protected function onLaunch() {
protected function onRegister() {
global $PAGE;

$returnurl = $_POST['launch_presentation_return_url'];
$returnurl = $this->returnUrl;
if (strpos($returnurl, '?') === false) {
$separator = '?';
} else {
Expand Down

0 comments on commit a618c70

Please sign in to comment.