public function actionDeleteall() { $delete = ExamScores::model()->findAllByAttributes(array('exam_id' => $_REQUEST['examid'])); foreach ($delete as $delete1) { $delete1->delete(); } $this->redirect(array('create', 'id' => $_REQUEST['id'], 'examid' => $_REQUEST['examid'])); }
public function actionAjax_delete() { $id = $_POST['id']; $deleted = $this->loadModel($id); $deleted_batch_id = $deleted->batch_id; // Saving the id of the batch that is going to be deleted. if ($deleted->delete()) { //Adding activity to feed via saveFeed($initiator_id,$activity_type,$goal_id,$goal_name,$field_name,$initial_field_value,$new_field_value) ActivityFeed::model()->saveFeed(Yii::app()->user->Id, '13', $deleted_batch_id, ucfirst($deleted->name), NULL, NULL, NULL); // For SMS $sms_settings = SmsSettings::model()->findAll(); $to = ''; if ($sms_settings[0]->is_enabled == '1' and $sms_settings[5]->is_enabled == '1') { // Checking if SMS is enabled. $students = Students::model()->findAll("batch_id=:x", array(':x' => $deleted_batch_id)); //Selecting students of the batch foreach ($students as $student) { if ($student->phone1) { // Checking if phone number is provided $to = $student->phone1; } elseif ($student->phone2) { $to = $student->phone2; } if ($to != '') { // Sending SMS to each student $college = Configurations::model()->findByPk(1); $from = $college->config_value; $message = $deleted->name . ' is cancelled'; SmsSettings::model()->sendSms($to, $from, $message); } } } // End For SMS // Delete Exam and exam score $exam = Exams::model()->findAllByAttributes(array('exam_group_id' => $id)); //print_r($exam); foreach ($exam as $exam1) { $examscore = ExamScores::model()->findAllByAttributes(array('exam_id' => $exam1->id)); foreach ($examscore as $examscore1) { $examscore1->delete(); } $exam1->delete(); } // End Delete Exam and exam score echo json_encode(array('success' => true)); exit; } else { echo json_encode(array('success' => false)); exit; } }
echo $cls; ?> > <td> <?php echo $student->admission_no; ?> </td> <td> <?php echo CHtml::link(ucfirst($student->first_name) . ' ' . ucfirst($student->middle_name) . ' ' . ucfirst($student->last_name), array('/students/students/view', 'id' => $student->id)); ?> </td> <?php foreach ($list as $exam) { $score = ExamScores::model()->findByAttributes(array('student_id' => $student->id, 'exam_id' => $exam->id)); $examgroup = ExamGroups::model()->findByAttributes(array('id' => $exam->exam_group_id)); ?> <td> <?php if ($score->marks != NULL or $score->remarks != NULL) { ?> <!-- Mark and Remarks Column --> <table align="center" width="100%" style="border:none;width:auto; min-width:80px;"> <tr> <td style="border:none;<?php if ($score->is_failed == 1) { ?> color:#F00;<?php }
public function actionStudentexam() { $model = new Students(); $flag = 0; if (isset($_POST['search'])) { $criteria = new CDbCriteria(); if (isset($_POST['student_id']) and $_POST['student_id'] != NULL) { $criteria->condition = 'student_id LIKE :match'; $criteria->params[':match'] = $_POST['student_id']; $id = $_POST['student_id']; } else { $flag = 1; //$this->redirect(array('studentexam','flag'=>$flag)); $this->render('studentexam', array('flag' => $flag)); exit; } $total = ExamScores::model()->count($criteria); $pages = new CPagination($total); $pages->setPageSize(Yii::app()->params['listPerPage']); $pages->applyLimit($criteria); // the trick is here! $posts = ExamScores::model()->findAll($criteria); $flag = 1; $this->render('studentexam', array('model' => $model, 'student' => $id, 'list' => $posts, 'pages' => $pages, 'item_count' => $total, 'page_size' => Yii::app()->params['listPerPage'])); exit; } $this->render('studentexam', array('model' => $model)); }
<?php $exm = Exams::model()->findByAttributes(array('id' => $_REQUEST['examid'])); $examgroups = ExamGroups::model()->findByAttributes(array('id' => $exm->exam_group_id)); if ($examgroups->exam_type == 'Marks') { $checkscores = ExamScores::model()->findByAttributes(array('exam_id' => $_REQUEST['examid'])); if ($checkscores != NULL) { $this->widget('zii.widgets.grid.CGridView', array('id' => 'exam-scores-grid', 'dataProvider' => $model1->search(), 'pager' => array('cssFile' => Yii::app()->baseUrl . '/css/formstyle.css'), 'cssFile' => Yii::app()->baseUrl . '/css/formstyle.css', 'columns' => array(array('header' => Yii::t('examination', 'Student Name'), 'value' => array($model, 'studentname'), 'name' => 'firstname', 'sortable' => true), 'marks', 'remarks', array('class' => 'CButtonColumn', 'buttons' => array('update' => array('label' => 'update', 'url' => 'Yii::app()->createUrl("/courses/examScores/update", array("sid"=>$data->id,"examid"=>$data->exam_id,"id"=>$_REQUEST["id"]))')), 'template' => '{update} {delete}', 'afterDelete' => 'function(){window.location.reload();}')))); } } else { if ($examgroups->exam_type == 'Grades') { $checkscores = ExamScores::model()->findByAttributes(array('exam_id' => $_REQUEST['examid'])); if ($checkscores != NULL) { $this->widget('zii.widgets.grid.CGridView', array('id' => 'exam-scores-grid', 'dataProvider' => $model1->search(), 'pager' => array('cssFile' => Yii::app()->baseUrl . '/css/formstyle.css'), 'cssFile' => Yii::app()->baseUrl . '/css/formstyle.css', 'columns' => array(array('header' => Yii::t('examination', 'Student Name'), 'value' => array($model, 'studentname'), 'name' => 'firstname', 'sortable' => true), 'marks', array('header' => 'Grades', 'value' => array($model, 'getgradinglevel'), 'name' => 'grading_level_id'), 'remarks', array('class' => 'CButtonColumn', 'buttons' => array('update' => array('label' => 'update', 'url' => 'Yii::app()->createUrl("/courses/examScores/update", array("sid"=>$data->id,"examid"=>$data->exam_id,"id"=>$_REQUEST["id"]))')), 'template' => '{update} {delete}', 'afterDelete' => 'function(){window.location.reload();}')))); } } else { $checkscores = ExamScores::model()->findByAttributes(array('exam_id' => $_REQUEST['examid'])); if ($checkscores != NULL) { $this->widget('zii.widgets.grid.CGridView', array('id' => 'exam-scores-grid', 'dataProvider' => $model1->search(), 'pager' => array('cssFile' => Yii::app()->baseUrl . '/css/formstyle.css'), 'cssFile' => Yii::app()->baseUrl . '/css/formstyle.css', 'columns' => array(array('header' => Yii::t('examination', 'Student Name'), 'value' => array($model, 'studentname'), 'name' => 'firstname', 'sortable' => true), 'marks', array('header' => Yii::t('examination', 'Grades'), 'value' => array($model, 'getgradinglevel'), 'name' => 'grading_level_id'), 'remarks', array('class' => 'CButtonColumn', 'buttons' => array('update' => array('label' => 'update', 'url' => 'Yii::app()->createUrl("/courses/examScores/update", array("sid"=>$data->id,"examid"=>$data->exam_id,"id"=>$_REQUEST["id"]))')), 'template' => '{update} {delete}', 'afterDelete' => 'function(){window.location.reload();}')))); } } } echo '</div></div>'; } else { echo '<div class="notifications nt_red">' . '<i>' . Yii::t('examination', 'No Scores Updated') . '</i></div>'; } ?> <?php } else { echo '<div class="notifications nt_red">' . '<i>' . Yii::t('examination', 'Nothing Found') . '</i></div>'; } ?>
public function actionDeletes() { $model = Students::model()->findByAttributes(array('id' => $_REQUEST['sid'])); $model->saveAttributes(array('is_deleted' => '1')); //Adding activity to feed via saveFeed($initiator_id,$activity_type,$goal_id,$goal_name,$field_name,$initial_field_value,$new_field_value) ActivityFeed::model()->saveFeed(Yii::app()->user->Id, '7', $model->id, ucfirst($model->first_name) . ' ' . ucfirst($model->middle_name) . ' ' . ucfirst($model->last_name), NULL, NULL, NULL); if ($model->uid and $model->uid != NULL and $model->uid != 0) { $user = User::model()->findByPk($model->uid); if ($user) { $profile = Profile::model()->findByPk($user->id); if ($profile) { $profile->delete(); } $user->delete(); } } $guardian = Guardians::model()->findByAttributes(array('ward_id' => $_REQUEST['sid'])); if ($guardian->uid and $guardian->uid != NULL and $guardian->uid != 0) { $parent_user = User::model()->findByPk($guardian->uid); if ($parent_user) { $profile = Profile::model()->findByPk($parent_user->id); if ($profile) { $profile->delete(); } $parent_user->delete(); } } $examscores = ExamScores::model()->DeleteAllByAttributes(array('student_id' => $_REQUEST['sid'])); $transactions = FinanceTransaction::model()->deleteAll('collection_id=:x', array(':x' => $_REQUEST['sid'])); $this->redirect(array('/courses/batches/batchstudents', 'id' => $_REQUEST['id'])); }
public function actionDeactivate($id) { $model = Courses::model()->findByPk($id); $model->is_deleted = 1; if ($model->save()) { // Batch Deletion $batches = Batches::model()->findAllByAttributes(array('course_id' => $id)); //Selecting all batches under the course with id = $id foreach ($batches as $batch) { // Student Deletion $students = Students::model()->findAllByAttributes(array('batch_id' => $batch->id)); foreach ($students as $student) { //Making student user inactive if ($student->uid != NULL and $student->uid != 0) { $student_user = User::model()->findByAttributes(array('id' => $student->uid)); if ($student_user != NULL) { $student_user->saveAttributes(array('status' => '0')); } } //Making parent user inactive $parent = Guardians::model()->findByAttributes(array('ward_id' => $student->id)); if ($parent->uid != NULL and $parent->uid != 0) { $parent_user = User::model()->findByAttributes(array('id' => $parent->uid)); if ($parent_user != NULL) { $parent_user->saveAttributes(array('status' => '0')); } } $student->saveAttributes(array('is_active' => '0', 'is_deleted' => '1')); // Student Deleted } // Subject Association Deletion $subjects = Subjects::model()->findAllByAttributes(array('batch_id' => $batch->id)); foreach ($subjects as $subject) { EmployeesSubjects::model()->DeleteAllByAttributes(array('subject_id' => $subject->id)); $subject->delete(); } // Exam Group Deletion $examgroups = ExamGroups::model()->findAllByAttributes(array('batch_id' => $batch->id)); foreach ($examgroups as $examgroup) { // Exams Deletion $exams = Exams::model()->findAllByAttributes(array('exam_group_id' => $examgroup->id)); foreach ($exams as $exam) { //Exam Score Deletion $examscores = ExamScores::model()->DeleteAllByAttributes(array('exam_id' => $exam->id)); $exam->delete(); //Exam Deleted } $examgroup->delete(); //Exam Group Deleted } //Fee Collection Deletion $collections = FinanceFeeCollections::model()->findAllByAttributes(array('batch_id' => $batch->id)); foreach ($collections as $collection) { // Finance Fees Deletion $student_fees = FinanceFees::model()->DeleteAllByAttributes(array('fee_collection_id' => $collection->id)); $transaction = FinanceTransaction::model()->DeleteAllByAttributes(array('collection_id' => $collection->id)); $collection->delete(); // Fee Collection Deleted } //Fee Category Deletion $categories = FinanceFeeCategories::model()->findAllByAttributes(array('batch_id' => $batch->id)); foreach ($categories as $category) { // Fee Particular Deletion $particulars = FinanceFeeParticulars::model()->DeleteAllByAttributes(array('finance_fee_category_id' => $category->id)); $category->delete(); // Fee Category Deleted } //Timetable Entry Deletion $periods = TimetableEntries::model()->DeleteAllByAttributes(array('batch_id' => $batch->id)); //Class Timings Deletion $class_timings = ClassTimings::model()->DeleteAllByAttributes(array('batch_id' => $batch->id)); //Delete Weekdays $weekdays = Weekdays::model()->DeleteAllByAttributes(array('batch_id' => $batch->id)); $batch->is_active = 0; $batch->is_deleted = 1; $batch->employee_id = ' '; $batch->save(); // Batch Deleted } Yii::app()->user->setFlash('success', "Selected course is deleted!"); $this->redirect(array('managecourse')); } }
public function actionDeletes() { $model = Students::model()->findByAttributes(array('id' => $_REQUEST['sid'])); $model->saveAttributes(array('is_deleted' => '1')); if ($model->uid and $model->uid != NULL and $model->uid != 0) { $user = User::model()->findByPk($model->uid); if ($user) { $profile = Profile::model()->findByPk($user->id); if ($profile) { $profile->delete(); } $user->delete(); } } $guardian = Guardians::model()->findByAttributes(array('ward_id' => $_REQUEST['sid'])); if ($guardian->uid and $guardian->uid != NULL and $guardian->uid != 0) { $parent_user = User::model()->findByPk($guardian->uid); if ($parent_user) { $profile = Profile::model()->findByPk($parent_user->id); if ($profile) { $profile->delete(); } $parent_user->delete(); } } $examscores = ExamScores::model()->DeleteAllByAttributes(array('student_id' => $_REQUEST['sid'])); $this->redirect(array('/courses/batches/batchstudents', 'id' => $_REQUEST['id'])); }
echo Yii::t('students', 'Admission No.'); ?> </th> <th><?php echo Yii::t('students', 'Marks'); ?> </th> <th><?php echo Yii::t('students', 'Remarks'); ?> </th></tr> <?php $data = Exams::model()->findAll("id=:x", array(':x' => $_REQUEST['examid'])); foreach ($data as $data1) { $score = $exam = ExamScores::model()->findAll('exam_id=:x', array(':x' => $data1->id)); foreach ($exam as $exam_1) { $student = Students::model()->findByAttributes(array('id' => $exam_1->student_id)); echo '<tr>'; echo '<td>' . $student->first_name . '</td>'; echo '<td>' . ($no = $student->admission_no . '</td>'); echo '<td>' . ($mark = $exam_1->marks . '</td>'); echo '<td>' . ($remark = $exam_1->remarks . '</td>'); echo '</tr>'; } } ?> </table> <?php }
public function actionUpdate($id) { $model = ExamScores::model()->findByAttributes(array('id' => $id)); $old_model = $model->attributes; // For activity feed // Uncomment the following line if AJAX validation is needed // $this->performAjaxValidation($model); if (isset($_POST['ExamScores'])) { $model->attributes = $_POST['ExamScores']; $exam = Exams::model()->findByAttributes(array('id' => $_REQUEST['exam_id'])); if ($model->marks < $exam->minimum_marks) { $model->is_failed = 1; } else { $model->is_failed = ''; } if ($model->save()) { // Saving to activity feed $results = array_diff_assoc($model->attributes, $old_model); // To get the fields that are modified. foreach ($results as $key => $value) { if ($key != 'updated_at') { $student = Students::model()->findByAttributes(array('id' => $model->student_id)); $student_name = ucfirst($student->first_name) . ' ' . ucfirst($student->middle_name) . ' ' . ucfirst($student->last_name); $subject_name = Subjects::model()->findByAttributes(array('id' => $exam->subject_id)); $examgroup = ExamGroups::model()->findByAttributes(array('id' => $exam->exam_group_id)); $batch = Batches::model()->findByAttributes(array('id' => $examgroup->batch_id)); $exam_name = ucfirst($subject_name->name) . ' - ' . ucfirst($examgroup->name) . ' (' . ucfirst($batch->name) . '-' . ucfirst($batch->course123->course_name) . ')'; $goal_name = $student_name . ' for the exam ' . $exam_name; if ($key == 'is_failed') { if ($value == 1) { $value = 'Fail'; } else { $value = 'Pass'; } if ($old_model[$key] == 1) { $old_model[$key] = 'Fail'; } else { $old_model[$key] = 'Pass'; } } //Adding activity to feed via saveFeed($initiator_id,$activity_type,$goal_id,$goal_name,$field_name,$initial_field_value,$new_field_value) ActivityFeed::model()->saveFeed(Yii::app()->user->Id, '21', $model->id, $goal_name, $model->getAttributeLabel($key), $old_model[$key], $value); } } //END saving to activity feed if ($_REQUEST['allexam'] == 1) { $url = 'default/allexam'; } else { $url = 'default/classexam'; } $this->redirect(array($url, 'bid' => $_REQUEST['bid'], 'exam_group_id' => $_REQUEST['exam_group_id'], 'r_flag' => $_REQUEST['r_flag'], 'exam_id' => $_REQUEST['exam_id'])); } } $this->render('examination/examination', array('model' => $model)); }
?> </li> </ul> </div> <div class="clear"></div> <div class="emp_right_contner"> <div class="emp_tabwrapper"> <?php $this->renderPartial('tab'); ?> <div class="clear"></div> <div class="emp_cntntbx" > <?php $exam = ExamScores::model()->findAll("student_id=:x", array(':x' => $_REQUEST['id'])); ?> <div class="tableinnerlist"> <table width="100%" cellpadding="0" cellspacing="0"> <!-- <tr> <th><?php echo Yii::t('students', 'Exam Group Name'); ?> </th> <th><?php echo Yii::t('students', 'Subject'); ?> </th> <th><?php echo Yii::t('students', 'Score'); ?>
$result_published = ExamGroups::model()->countByAttributes(array('id' => $exam_group_id, 'result_published' => 1)); $is_teaching_subject = TimetableEntries::model()->countByAttributes(array('subject_id' => $subject_id->subject_id, 'employee_id' => $employee_id)); $score_flag = 0; // If $score_flag == 0, form for editing scores will not be displayed. If $score_flag == 1, form will be displayed. if ((Yii::app()->controller->action->id == 'classexam' or Yii::app()->controller->action->id == 'update') and $classteacher->id == $employee_id or Yii::app()->controller->action->id == 'update' and $_REQUEST['allexam'] == 1) { // Class teacher and subject teacher can edit scores for all subjects in their batch. $score_flag = 1; } if (Yii::app()->controller->action->id == 'allexam' and $is_teaching_subject <= 0) { $score_flag = 0; } /*echo 'Result Published: '.$result_published.'<br/>'; echo 'Is Teaching Subject: '.$is_teaching_subject.'<br/>'; echo 'Score Flag: '.$score_flag.'<br/>';*/ if ($score_flag == 1) { ?> <!-- Start Edit Exam Scores --> <?php $model = ExamScores::model()->findByAttributes(array('id' => $_REQUEST['id'])); $this->renderPartial('examination/examScores/_form1', array('model' => $model, 'batch_id' => $batch_id, 'exam_group_id' => $exam_group_id, 'r_flag' => 1, 'exam_id' => $exam_id)); // Rendering edit form ?> <!-- End Edit Exam Scores --> <?php } ?> </div>
public function actionRemove() { $val = $_GET['val1']; $model = Batches::model()->findByPk($val); $model->is_active = 0; $model->is_deleted = 1; $model->employee_id = ' '; if ($model->save()) { // Student Deletion $students = Students::model()->findAllByAttributes(array('batch_id' => $model->id)); foreach ($students as $student) { //Making student user inactive if ($student->uid != NULL and $student->uid != 0) { $student_user = User::model()->findByAttributes(array('id' => $student->uid)); if ($student_user != NULL) { $student_user->saveAttributes(array('status' => '0')); } } //Making parent user inactive $parent = Guardians::model()->findByAttributes(array('ward_id' => $student->id)); if ($parent->uid != NULL and $parent->uid != 0) { $parent_user = User::model()->findByAttributes(array('id' => $parent->uid)); if ($parent_user != NULL) { $parent_user->saveAttributes(array('status' => '0')); } } $student->saveAttributes(array('is_active' => '0', 'is_deleted' => '1')); // Student Deleted } // Subject Association Deletion $subjects = Subjects::model()->findAllByAttributes(array('batch_id' => $model->id)); foreach ($subjects as $subject) { EmployeesSubjects::model()->DeleteAllByAttributes(array('subject_id' => $subject->id)); $subject->delete(); } // Exam Group Deletion $examgroups = ExamGroups::model()->findAllByAttributes(array('batch_id' => $model->id)); foreach ($examgroups as $examgroup) { // Exams Deletion $exams = Exams::model()->findAllByAttributes(array('exam_group_id' => $examgroup->id)); foreach ($exams as $exam) { //Exam Score Deletion $examscores = ExamScores::model()->DeleteAllByAttributes(array('exam_id' => $exam->id)); $exam->delete(); //Exam Deleted } $examgroup->delete(); //Exam Group Deleted } //Fee Collection Deletion $collections = FinanceFeeCollections::model()->findAllByAttributes(array('batch_id' => $model->id)); foreach ($collections as $collection) { // Finance Fees Deletion $student_fees = FinanceFees::model()->DeleteAllByAttributes(array('fee_collection_id' => $collection->id)); $collection->delete(); // Fee Collection Deleted } //Fee Category Deletion $categories = FinanceFeeCategories::model()->findAllByAttributes(array('batch_id' => $model->id)); foreach ($categories as $category) { // Fee Particular Deletion $particulars = FinanceFeeParticulars::model()->DeleteAllByAttributes(array('finance_fee_category_id' => $category->id)); $category->delete(); // Fee Category Deleted } //Timetable Entry Deletion $periods = TimetableEntries::model()->DeleteAllByAttributes(array('batch_id' => $model->id)); //Class Timings Deletion $class_timings = ClassTimings::model()->DeleteAllByAttributes(array('batch_id' => $model->id)); //Delete Weekdays $weekdays = Weekdays::model()->DeleteAllByAttributes(array('batch_id' => $model->id)); } echo $val; }
} else { echo '-'; } ?> </td> <td align="center"> <?php $recent_exams = Exams::model()->findAllByAttributes(array('exam_group_id' => $recent_exam_group->id)); if ($recent_exams != NULL) { if ($students > 0) { $total_maximum_marks = 0; $total_exam_average = 0; foreach ($recent_exams as $recent_exam) { $exam_student_total = 0; $total_maximum_marks = $total_maximum_marks + $recent_exam->maximum_marks; $scores = ExamScores::model()->findAllByAttributes(array('exam_id' => $recent_exam->id)); if ($scores != NULL) { foreach ($scores as $score) { $exam_student_total = $exam_student_total + $score->marks; } } $exam_average = $exam_student_total / $students; $total_exam_average = $total_exam_average + $exam_average; } $average = round($total_exam_average / $total_maximum_marks * 100); if ($average != 0) { echo $average . ' %'; } else { echo Yii::t('examination', 'No scores entered'); } } else {
public function actionPdf() { //echo $_REQUEST['id']; // echo $_REQUEST['examid']; exit; # HTML2PDF has very similar syntax $html2pdf = Yii::app()->ePdf->HTML2PDF(); $html2pdf->WriteHTML($this->renderPartial('printpdf', array('model' => ExamScores::model()->findByAttributes(array('exam_id' => $_REQUEST['examid']))), true)); $html2pdf->Output(); //////////////////////////////////////////////////////////////////////////////////// }
$goal = ExamGroups::model()->findByAttributes(array('id' => $feed->goal_id)); if ($goal != NULL) { echo CHtml::link(ucfirst($feed->goal_name), array('examination/exams/create', 'exam_group_id' => $goal->id, 'id' => $goal->batch_id)); } else { echo $feed->goal_name; } } elseif ($feed->activity_type >= 17 and $feed->activity_type <= 19) { $goal = Exams::model()->findByAttributes(array('id' => $feed->goal_id)); if ($goal != NULL) { echo CHtml::link(ucfirst($feed->goal_name), array('examination/exams/update', 'sid' => $goal->id, 'exam_group_id' => $goal->exam_group_id, 'id' => $examgroup->batch_id)); //echo $feed->goal_name; } else { echo $feed->goal_name; } } elseif ($feed->activity_type >= 20 and $feed->activity_type <= 22) { $goal = ExamScores::model()->findByAttributes(array('id' => $feed->goal_id)); if ($goal != NULL) { $exam = Exams::model()->findByAttributes(array('id' => $goal->exam_id)); $examgroup = ExamGroups::model()->findByAttributes(array('id' => $exam->exam_group_id)); echo CHtml::link(ucfirst($feed->goal_name), array('examination/examScores/update', 'sid' => $goal->id, 'examid' => $goal->exam_id, 'id' => $examgroup->batch_id)); } else { echo $feed->goal_name; } } elseif ($feed->activity_type >= 23 and $feed->activity_type <= 28) { $goal = Employees::model()->findByAttributes(array('id' => $feed->goal_id)); if ($goal != NULL and $goal->is_deleted != 1) { echo CHtml::link($feed->goal_name, array('employees/employees/view', 'id' => $goal->id)); } else { echo $feed->goal_name; } }
<?php $this->renderPartial('leftside'); ?> <?php $user = User::model()->findByAttributes(array('id' => Yii::app()->user->id)); $guardian = Guardians::model()->findByAttributes(array('uid' => Yii::app()->user->id)); $students = Students::model()->findAllByAttributes(array('parent_id' => $guardian->id)); if (count($students) == 1) { $student = Students::model()->findByAttributes(array('id' => $students[0]->id)); } elseif (isset($_REQUEST['id']) and $_REQUEST['id'] != NULL) { $student = Students::model()->findByAttributes(array('id' => $_REQUEST['id'])); } elseif (count($students) > 1) { $student = Students::model()->findByAttributes(array('id' => $students[0]->id)); } $exam = ExamScores::model()->findAll("student_id=:x", array(':x' => $student->id)); ?> <div id="parent_rightSect"> <div class="parentright_innercon"> <h1><?php echo Yii::t('parentportal', 'Exams'); ?> </h1> <div class="profile_top"> <div class="prof_img"> <?php if ($student->photo_data != NULL) { echo '<img src="' . $this->createUrl('/students/Students/DisplaySavedImage&id=' . $student->primaryKey) . '" alt="' . $student->photo_file_name . '" width="100" height="103" />'; } elseif ($student->gender == 'M') { echo '<img src="images/portal/prof-img_male.png" alt=' . $student->first_name . ' width="100" height="103" />'; } elseif ($student->gender == 'F') {
<?php } else { echo '<i>' . Yii::t('examination', 'No Students In This Batch') . '</i>'; } ?> <?php } ?> </div> </div> <!-- End Enter Exam Scores --> <?php } ?> <?php $checkscores = ExamScores::model()->findByAttributes(array('exam_id' => $exam_id)); if ($checkscores != NULL) { ?> <div> <div> <?php if ($score_flag == 1) { // If $score_flag==1, display clear all button ?> <div class="c_subbutCon" align="right" style="width:100%"> <div class="c_cubbut" style="width:140px;"> <ul> <li> <?php if (Yii::app()->controller->action->id == 'classexam') { echo CHtml::link(Yii::t('examination', 'Clear All Scores'), array('default/deleteall', "bid" => $batch_id, "exam_group_id" => $exam_group_id, "r_flag" => 1, "exam_id" => $exam_id), array('class' => 'addbttn last', 'confirm' => 'Are You Sure? All Scores will be deleted.'));