Add frontend test scoring
This commit is contained in:
@@ -5,8 +5,18 @@ namespace Komponent\Component\Testquestions\Site\Controller;
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\MVC\Controller\BaseController;
|
||||
use Joomla\CMS\Session\Session;
|
||||
|
||||
class DisplayController extends BaseController
|
||||
{
|
||||
protected $default_view = 'questions';
|
||||
|
||||
public function check()
|
||||
{
|
||||
if (!Session::checkToken()) {
|
||||
throw new \RuntimeException('Invalid token', 403);
|
||||
}
|
||||
|
||||
return $this->display();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user