Add bulk deletion for saved test results

This commit is contained in:
Wojtek
2026-10-16 21:45:34 +02:00
parent 8e62165a1a
commit 032ffeb9da
7 changed files with 68 additions and 3 deletions
@@ -8,6 +8,7 @@ use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\CMS\Factory;
class HtmlView extends BaseHtmlView
{
@@ -25,6 +26,9 @@ class HtmlView extends BaseHtmlView
$this->sets = $this->get('Sets');
$this->aiUsageTotals = $this->get('AiUsageTotals');
ToolbarHelper::title(Text::_('COM_TESTQUESTIONS_RESULTS'));
if (Factory::getApplication()->getIdentity()->authorise('core.delete', 'com_testquestions')) {
ToolbarHelper::deleteList('', 'results.delete', 'JTOOLBAR_DELETE');
}
ToolbarHelper::link('index.php?option=com_testquestions&view=sets', 'COM_TESTQUESTIONS_SETS', 'back');
return parent::display($tpl);