Implementing custom LTI icon support
This commit is contained in:
+6
-1
@@ -911,7 +911,12 @@ class theme_config {
|
||||
$params['component'] = $component;
|
||||
}
|
||||
|
||||
return new moodle_url("$CFG->httpswwwroot/theme/image.php", $params);
|
||||
//Allow references to images on other sites.
|
||||
if(strstr($imagename, '://')){
|
||||
return $imagename;
|
||||
} else {
|
||||
return new moodle_url("$CFG->httpswwwroot/theme/image.php", $params);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -163,6 +163,20 @@ function lti_delete_instance($id) {
|
||||
return $DB->delete_records("lti", array("id" => $basiclti->id));
|
||||
}
|
||||
|
||||
function lti_get_coursemodule_info($coursemodule){
|
||||
global $DB;
|
||||
|
||||
$lti = $DB->get_record('lti', array('id' => $coursemodule->instance), 'icon');
|
||||
|
||||
$info = new stdClass();
|
||||
|
||||
if(!empty($lti->icon)){
|
||||
$info->icon = $lti->icon;
|
||||
}
|
||||
|
||||
return $info;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a small object with summary information about what a
|
||||
* user has done with a given particular instance of this module
|
||||
|
||||
Reference in New Issue
Block a user