public function actionActivateQueue()
{
if (!($queue = models\Queue::model()->findByPk((int) @$_POST['id']))) {
throw new \CHttpException(404, 'Queue not found with id ' . @$_POST['id']);
}
$queue->active = true;
if (!$queue->save()) {
throw new \CHttpException(500, 'Could not change queue state');
}
\Audit::add('admin', 'update', $queue->id, null, array('module' => 'PatientTicketing', 'model' => $queue->getShortModelName()));
echo 1;
}