From baf41e4b9962c5c19f87366ec8b242fcfa3ae536 Mon Sep 17 00:00:00 2001 From: Frederic Massart Date: Fri, 23 Nov 2012 16:52:46 +0800 Subject: [PATCH] MDL-36802 usability: New icons used for LTI settings --- mod/lti/locallib.php | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/mod/lti/locallib.php b/mod/lti/locallib.php index 8c9a3ef4d5b..17666596baf 100644 --- a/mod/lti/locallib.php +++ b/mod/lti/locallib.php @@ -357,11 +357,16 @@ function lti_get_tool_table($tools, $id) { $update = get_string('update', 'lti'); $delete = get_string('delete', 'lti'); - $accepthtml = " - wwwroot}/mod/lti/typessettings.php?action=accept&id={$type->id}&sesskey={$USER->sesskey}&tab={$id}\" title=\"{$accept}\"> - \"{$accept}\"wwwroot}/pix/t/clear.gif\"/> - - "; + $baseurl = new moodle_url('/mod/lti/typessettings.php', array( + 'action' => 'accept', + 'id' => $type->id, + 'sesskey' => sesskey(), + 'tab' => $id + )); + + $accepthtml = $OUTPUT->action_icon($baseurl, + new pix_icon('t/check', $accept, '', array('class' => 'iconsmall')), null, + array('title' => $accept, 'class' => 'editing_accept')); $deleteaction = 'delete'; @@ -374,6 +379,17 @@ function lti_get_tool_table($tools, $id) { $delete = get_string('reject', 'lti'); } + $updateurl = clone($baseurl); + $updateurl->param('action', 'update'); + $updatehtml = $OUTPUT->action_icon($updateurl, + new pix_icon('t/edit', $accept, '', array('class' => 'iconsmall')), null, + array('title' => $update, 'class' => 'editing_update')); + + $deleteurl = clone($baseurl); + $deleteurl->param('action', $deleteaction); + $deletehtml = $OUTPUT->action_icon($deleteurl, + new pix_icon('t/delete', $accept, '', array('class' => 'iconsmall')), null, + array('title' => $delete, 'class' => 'editing_delete')); $html .= " @@ -386,13 +402,7 @@ function lti_get_tool_table($tools, $id) { {$date} - {$accepthtml} - wwwroot}/mod/lti/typessettings.php?action=update&id={$type->id}&sesskey={$USER->sesskey}&tab={$id}\" title=\"{$update}\"> - \"{$update}\"wwwroot}/pix/t/edit.gif\"/> - - wwwroot}/mod/lti/typessettings.php?action={$deleteaction}&id={$type->id}&sesskey={$USER->sesskey}&tab={$id}\" title=\"{$delete}\"> - \"{$delete}\"wwwroot}/pix/t/delete.gif\"/> - + {$accepthtml}{$updatehtml}{$deletehtml} ";