Skip to content

Commit

Permalink
Merge branch 'MDL-36802-master' of git://github.com/FMCorz/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
danpoltawski committed Nov 27, 2012
2 parents 58f46a0 + baf41e4 commit dcb58f9
Showing 1 changed file with 22 additions and 12 deletions.
34 changes: 22 additions & 12 deletions mod/lti/locallib.php
Expand Up @@ -357,11 +357,16 @@ function lti_get_tool_table($tools, $id) {
$update = get_string('update', 'lti');
$delete = get_string('delete', 'lti');

$accepthtml = "
<a class=\"editing_accept\" href=\"{$CFG->wwwroot}/mod/lti/typessettings.php?action=accept&amp;id={$type->id}&amp;sesskey={$USER->sesskey}&amp;tab={$id}\" title=\"{$accept}\">
<img class=\"iconsmall\" alt=\"{$accept}\" src=\"{$CFG->wwwroot}/pix/t/clear.gif\"/>
</a>
";
$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';

Expand All @@ -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 .= "
<tr>
<td>
Expand All @@ -386,13 +402,7 @@ function lti_get_tool_table($tools, $id) {
{$date}
</td>
<td align=\"center\">
{$accepthtml}
<a class=\"editing_update\" href=\"{$CFG->wwwroot}/mod/lti/typessettings.php?action=update&amp;id={$type->id}&amp;sesskey={$USER->sesskey}&amp;tab={$id}\" title=\"{$update}\">
<img class=\"iconsmall\" alt=\"{$update}\" src=\"{$CFG->wwwroot}/pix/t/edit.gif\"/>
</a>
<a class=\"editing_delete\" href=\"{$CFG->wwwroot}/mod/lti/typessettings.php?action={$deleteaction}&amp;id={$type->id}&amp;sesskey={$USER->sesskey}&amp;tab={$id}\" title=\"{$delete}\">
<img class=\"iconsmall\" alt=\"{$delete}\" src=\"{$CFG->wwwroot}/pix/t/delete.gif\"/>
</a>
{$accepthtml}{$updatehtml}{$deletehtml}
</td>
</tr>
";
Expand Down

0 comments on commit dcb58f9

Please sign in to comment.