public function actionStudentprogress()
 {
     $model = new Progress('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Progress'])) {
         $model->attributes = $_GET['Progress'];
     }
     if (isset($_POST['id_discipline'])) {
         $id = $_POST['id_discipline'];
         $criteria = new CDbCriteria();
         $criteria->compare('lesson.id_discipline', $id);
         $criteria->compare('t.id_user', Yii::app()->user->id);
         $criteriaAttendance = clone $criteria;
         //$criteriaAttendance->compare('attendance', 1);
         $criteriaEstimate = clone $criteria;
         $criteriaEstimate->compare('attendance', 0);
         unset($criteria);
         $this->renderPartial('_progressAttendanceStudent', array('model' => $model, 'criteriaAttendance' => $criteriaAttendance));
         $this->renderPartial('_progressEstimateStudent', array('model' => $model, 'criteriaEstimate' => $criteriaEstimate));
         Yii::app()->end();
     }
     $disp = DisciplineToUser::model()->findByAttributes(array('id_user' => Yii::app()->user->id));
     $id = $disp ? $disp->id_discipline : 0;
     $criteria = new CDbCriteria();
     $criteria->compare('lesson.id_discipline', $id);
     $criteria->compare('t.id_user', Yii::app()->user->id);
     $criteriaAttendance = clone $criteria;
     //$criteriaAttendance->compare('attendance', 1);
     $criteriaEstimate = clone $criteria;
     $criteriaEstimate->compare('attendance', 0);
     unset($criteria);
     $this->render('showProgressStudent', array('model' => $model, 'criteriaAttendance' => $criteriaAttendance, 'criteriaEstimate' => $criteriaEstimate));
 }