blob: 45da0723d6dee0b1b52b298dcb011ee25a89c33c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
<?php
class Evaluation_PoolController extends AuthenticatedController
{
public function before_filter(&$action, &$args)
{
parent::before_filter($action, $args);
if (!EvaluationHelper::isPermittedEvaluationAccess()) {
throw new AccessDeniedException();
}
}
public function index_action()
{
Navigation::activateItem('/evaluation/pool');
$this->templates = Questionnaire::findBySQL("`is_template` = 1");
}
public function template_enable_action(Questionnaire $template)
{
$template->template_is_enabled = (int)!$template->template_is_enabled;
$template->store();
$this->redirect('evaluation/pool');
}
}
|