Implementing custom LTI icon support

This commit is contained in:
Chris Scribner
2011-11-06 20:41:57 -05:00
parent 57836e2403
commit c07aec164f
2 changed files with 20 additions and 1 deletions
+6 -1
View File
@@ -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);
}
}
/**
+14
View File
@@ -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