public function actionOcenka31($id=3)
{
$ocenka = new ocenka();
//if($_POST) { echo ''; print_r($_POST); echo ''; }
$ocenka->date_from=new CDbExpression('NOW()');
$ocenkas=OfficeType::model()->findByPk($_POST['Office']['Office_type_id']);
$ocenka->full_name=$ocenkas->name;
//if($_POST) { echo ''; print_r($_POST); echo ''; }
//$ocenka->ocenka='3';
//$ocenka_post = (isset($_POST['ocenkas'])) ? $_POST['ocenkas'] : null;
$ocenka->ocenka=$_POST['ocenka'];
$ocenka->save();
//Yii::app()->user->setFlash('success',"Спасибо за Вашу оценку. мы учтем это в нашей работе");
$respons3 = array('status' => 'success');
echo json_encode($respons3);
}
<button id="Office-reservd" type="button" class="button" data-ocenka="3"
onclick="Ocenka3($(this))">
<span class="btn-text">Удовлетворительно</span>
</button>
if ($form.length !== 0) {
data = $form.serialize();
data['ocenka'] = $element.data('ocenka');
url = $form.attr('action');
}