Add action to unpublish all test sets
This commit is contained in:
@@ -15,6 +15,7 @@ class HtmlView extends BaseHtmlView
|
||||
protected $pagination;
|
||||
protected $state;
|
||||
protected $subjects;
|
||||
protected $canUnpublishAll = false;
|
||||
|
||||
public function display($tpl = null)
|
||||
{
|
||||
@@ -22,6 +23,8 @@ class HtmlView extends BaseHtmlView
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->subjects = $this->get('Subjects');
|
||||
$user = $this->getCurrentUser();
|
||||
$this->canUnpublishAll = $user->authorise('core.edit.state', 'com_testquestions') || $user->authorise('core.edit', 'com_testquestions');
|
||||
|
||||
if (count($errors = $this->get('Errors'))) {
|
||||
throw new \RuntimeException(implode("\n", $errors));
|
||||
|
||||
Reference in New Issue
Block a user