Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Implementing custom LTI icon support

  • Loading branch information...
commit c07aec164f5785f8cf0df03a5907e5c2d813817e 1 parent 57836e2
scriby scriby authored
Showing with 20 additions and 1 deletion.
  1. +6 −1 lib/outputlib.php
  2. +14 −0 mod/lti/lib.php
7 lib/outputlib.php
View
@@ -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);
+ }
}
/**
14 mod/lti/lib.php
View
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.