Commit 02287552 authored by Richard Mansfield's avatar Richard Mansfield

Move creative commons images to theme static/images directory so they get...

Move creative commons images to theme static/images directory so they get picked up by html export (bug #513589)
Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent dce06ab1
...@@ -49,6 +49,7 @@ class PluginBlocktypeCreativecommons extends SystemBlocktype { ...@@ -49,6 +49,7 @@ class PluginBlocktypeCreativecommons extends SystemBlocktype {
} }
public static function render_instance(BlockInstance $instance, $editing=false) { public static function render_instance(BlockInstance $instance, $editing=false) {
global $THEME;
$configdata = $instance->get('configdata'); $configdata = $instance->get('configdata');
if (!isset($configdata['license'])) { if (!isset($configdata['license'])) {
return ''; return '';
...@@ -60,8 +61,8 @@ class PluginBlocktypeCreativecommons extends SystemBlocktype { ...@@ -60,8 +61,8 @@ class PluginBlocktypeCreativecommons extends SystemBlocktype {
$html = '<a rel="license" href="http://creativecommons.org/licenses/'.$licensetype.'/3.0/"><img alt="'. $html = '<a rel="license" href="http://creativecommons.org/licenses/'.$licensetype.'/3.0/"><img alt="'.
get_string('alttext', 'blocktype.creativecommons'). get_string('alttext', 'blocktype.creativecommons').
'" style="border-width:0" src="'.get_config('wwwroot').'blocktype/creativecommons/icons/'. '" style="border-width:0" src="'.
$licensetype.'-3_0.png" /></a>'; $THEME->get_url('images/' . $licensetype . '-3_0.png', false, 'blocktype/creativecommons') . '" /></a>';
$html .= '<br>'; $html .= '<br>';
$html .= get_string('licensestatement', 'blocktype.creativecommons', $licenseurl, $licensename); $html .= get_string('licensestatement', 'blocktype.creativecommons', $licenseurl, $licensename);
return $html; return $html;
...@@ -90,6 +91,7 @@ class PluginBlocktypeCreativecommons extends SystemBlocktype { ...@@ -90,6 +91,7 @@ class PluginBlocktypeCreativecommons extends SystemBlocktype {
} }
public static function instance_config_form($instance) { public static function instance_config_form($instance) {
global $THEME;
$configdata = $instance->get('configdata'); $configdata = $instance->get('configdata');
$noncommercial = 0; $noncommercial = 0;
...@@ -123,7 +125,7 @@ class PluginBlocktypeCreativecommons extends SystemBlocktype { ...@@ -123,7 +125,7 @@ class PluginBlocktypeCreativecommons extends SystemBlocktype {
'<img "alt="'.hsc(get_string('sealalttext', 'blocktype.creativecommons')).'" '. '<img "alt="'.hsc(get_string('sealalttext', 'blocktype.creativecommons')).'" '.
'onload="'.hsc($sealpositionhack).'" '. 'onload="'.hsc($sealpositionhack).'" '.
'style="border-width:0;" src="'. 'style="border-width:0;" src="'.
get_config('wwwroot').'blocktype/creativecommons/icons/seal.png" /></a></div>', $THEME->get_url('images/seal.png', false, 'blocktype/creativecommons') . '" /></a></div>',
), ),
'noncommercial' => array( 'noncommercial' => array(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment