Browse files

Implementing custom LTI icon support

  • Loading branch information...
1 parent 57836e2 commit c07aec164f5785f8cf0df03a5907e5c2d813817e @scriby scriby committed Oct 10, 2011
Showing with 20 additions and 1 deletion.
  1. +6 −1 lib/outputlib.php
  2. +14 −0 mod/lti/lib.php
View
7 lib/outputlib.php
@@ -911,7 +911,12 @@ public function pix_url($imagename, $component) {
$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);
+ }
}
/**
View
14 mod/lti/lib.php
@@ -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

0 comments on commit c07aec1

Please sign in to comment.