Changed icon for downloading certificate from reports

This was done because the core 'import' icon was mapped
to the Font Awesome icon 'fa-level-up' which did not look
appropriate.
This commit is contained in:
Mark Nelson 2018-05-21 21:34:53 +08:00
parent f7732690ab
commit f28c2324e2
5 changed files with 14 additions and 2 deletions

View file

@ -136,7 +136,7 @@ class my_certificates_table extends \table_sql {
public function col_download($certificate) { public function col_download($certificate) {
global $OUTPUT; global $OUTPUT;
$icon = new \pix_icon('i/import', get_string('download')); $icon = new \pix_icon('download', get_string('download'), 'customcert');
$link = new \moodle_url('/mod/customcert/my_certificates.php', $link = new \moodle_url('/mod/customcert/my_certificates.php',
array('userid' => $this->userid, array('userid' => $this->userid,
'certificateid' => $certificate->id, 'certificateid' => $certificate->id,

View file

@ -145,7 +145,7 @@ class report_table extends \table_sql {
public function col_download($user) { public function col_download($user) {
global $OUTPUT; global $OUTPUT;
$icon = new \pix_icon('i/import', get_string('download')); $icon = new \pix_icon('download', get_string('download'), 'customcert');
$link = new \moodle_url('/mod/customcert/report.php', $link = new \moodle_url('/mod/customcert/report.php',
array('id' => $this->cm->id, array('id' => $this->cm->id,
'downloadcert' => '1', 'downloadcert' => '1',

View file

@ -418,3 +418,12 @@ function mod_customcert_inplace_editable($itemtype, $itemid, $newvalue) {
$updateelement->name, $updateelement->name); $updateelement->name, $updateelement->name);
} }
} }
/**
* Get icon mapping for font-awesome.
*/
function mod_customcert_get_fontawesome_icon_map() {
return [
'mod_customcert:download' => 'fa-download'
];
}

BIN
pix/download.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 B

3
pix/download.svg Normal file
View file

@ -0,0 +1,3 @@
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
<!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
]><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" preserveAspectRatio="xMinYMid meet" overflow="visible"><path d="M16 9v6c0 .5-.5 1-1 1H1c-.5 0-1-.5-1-1V9c0-.5.5-1 1-1h1c.5 0 1 .5 1 1v4h10V9c0-.5.5-1 1-1h1c.5 0 1 .5 1 1zm-3.6-3.9l-.7-.7c-.4-.4-1-.4-1.4 0l-.8.8V1c0-.5-.4-1-1-1h-1c-.5 0-1 .5-1 1v4.2l-.8-.8c-.4-.4-1-.4-1.4 0l-.7.7c-.4.4-.4 1 0 1.4l3.7 3.7c.2.2.5.3.7.3.3 0 .5-.1.7-.3l3.7-3.7c.4-.3.4-1 0-1.4z" fill="#999"/></svg>

After

Width:  |  Height:  |  Size: 618 B