public function executeShowEkskul() { $employee_id = sfContext::getInstance()->getUser()->getAttribute('user_id', null, 'bo'); $employee = EmployeePeer::retrieveByPK($employee_id); $this->forward404Unless($employee); $counseling_id = $this->getRequestParameter('counseling_id'); $counseling = CounselingPeer::retrieveByPK($counseling_id); $this->forward404Unless($counseling); $accal_id = $this->getRequestParameter('accal_id'); $academic_calendar = AcademicCalendarPeer::retrieveByPK($accal_id); $this->forward404Unless($academic_calendar); $grade_component = GradeComponentPeer::retrieveByPk($this->getRequestParameter('id')); $this->forward404Unless($grade_component); $student_id = $this->getRequestParameter('student_id'); $student = StudentPeer::retrieveByPK($this->getRequestParameter('student_id')); $this->forward404Unless($student); $actions = array(array('name' => 'back', 'url' => 'counseling_hist/listEkskul?student_id=' . $student->getId() . '&counseling_id=' . $counseling->getId(), 'color' => 'black')); $this->actions = $actions; $actions2 = array(array('name' => '<span>' . $academic_calendar->toString() . '</span>', 'url' => 'counseling_hist/listDetail?accal_id=' . $academic_calendar->getId() . '&counseling_id=' . $counseling->getId(), 'color' => 'sun')); array_push($actions2, array('name' => '<span>Absensi Siswa</span>', 'url' => 'counseling_hist/listAbsence?student_id=' . $student->getId() . '&counseling_id=' . $counseling->getId() . '&accal_id=' . $academic_calendar->getId(), 'color' => 'sun')); array_push($actions2, array('name' => '<span>Prestasi Siswa</span>', 'url' => 'counseling_hist/listAchievement?student_id=' . $student->getId() . '&counseling_id=' . $counseling->getId() . '&accal_id=' . $academic_calendar->getId(), 'color' => 'sun')); array_push($actions2, array('name' => '<span>Orang Tua</span>', 'url' => 'counseling_hist/listParent?student_id=' . $student->getId() . '&counseling_id=' . $counseling->getId() . '&accal_id=' . $academic_calendar->getId(), 'color' => 'sun')); array_push($actions2, array('name' => '<span>Ekskul Siswa</span>', 'url' => 'counseling_hist/listEkskul?student_id=' . $student->getId() . '&counseling_id=' . $counseling->getId() . '&accal_id=' . $academic_calendar->getId(), 'color' => 'sun', 'type' => 'direct')); array_push($actions2, array('name' => '<span>Pembiasaan Siswa</span>', 'url' => 'counseling_hist/listExtra?student_id=' . $student->getId() . '&counseling_id=' . $counseling->getId() . '&accal_id=' . $academic_calendar->getId(), 'color' => 'sun')); array_push($actions2, array('name' => '<span>Raport Bayangan</span>', 'url' => 'counseling_hist/listMiddle?student_id=' . $student->getId() . '&counseling_id=' . $counseling->getId() . '&accal_id=' . $academic_calendar->getId(), 'color' => 'sun')); array_push($actions2, array('name' => '<span>Raport</span>', 'url' => 'counseling_hist/listFinal?student_id=' . $student->getId() . '&counseling_id=' . $counseling->getId() . '&accal_id=' . $academic_calendar->getId(), 'color' => 'sun')); $this->actions2 = $actions2; $this->subtitle = $student->getName() . ' # Kelas : ' . $student->getClassGroup()->toString() . ' (' . $academic_calendar->toString() . ') '; $this->counseling = $counseling; $this->counseling_id = $counseling_id; $this->student = $student; $this->grade_component = $grade_component; $this->academic_calendar = $academic_calendar; }
public function executeShowEkskul() { $employee_id = sfContext::getInstance()->getUser()->getAttribute('user_id', null, 'bo'); $employee = EmployeePeer::retrieveByPK($employee_id); $this->forward404Unless($employee); $counseling_id = $this->getRequestParameter('counseling_id'); $counseling = CounselingPeer::retrieveByPK($counseling_id); $this->forward404Unless($counseling); $accal_id = $this->getRequestParameter('accal_id'); $academic_calendar = AcademicCalendarPeer::retrieveByPK($accal_id); $this->forward404Unless($academic_calendar); $grade_component = GradeComponentPeer::retrieveByPk($this->getRequestParameter('id')); $this->forward404Unless($grade_component); $this->subtitle = $grade_component->toString() . ' - id:' . $grade_component->getId(); $student_id = $this->getRequestParameter('student_id'); $student = StudentPeer::retrieveByPK($this->getRequestParameter('student_id')); $this->forward404Unless($student); $actions = array(array('name' => 'back', 'url' => 'counseling_detail/listEkskul?student_id=' . $student->getId() . '&counseling_id=' . $counseling->getId(), 'color' => 'black')); $this->actions = $actions; $actions2 = array(array('name' => '<span>' . $academic_calendar->toString() . '</span>', 'url' => 'counseling/listStudentByEmployee?accal_id=' . $academic_calendar->getId() . '&counseling_id=' . $counseling->getId() . '&employee_id=' . $employee_id, 'color' => 'sky')); array_push($actions2, array('name' => '<span>Ekskul Siswa</span>', 'url' => 'counseling_detail/listEkskul?student_id=' . $student->getId() . '&counseling_id=' . $counseling->getId() . '&accal_id=' . $academic_calendar->getId(), 'color' => 'sun', 'type' => 'direct')); $this->actions2 = $actions2; $this->counseling = $counseling; $this->counseling_id = $counseling_id; $this->student = $student; $this->grade_component = $grade_component; $this->employee = $employee; $this->academic_calendar = $academic_calendar; }
public function executeDeleteEkskul() { $grade_component = GradeComponentPeer::retrieveByPk($this->getRequestParameter('id')); $this->forward404Unless($grade_component); $ref_error = 0; foreach ($grade_component->getRefCountMethods() as $ref) { $method = "count" . $ref['affix']; $count = $grade_component->{$method}(); if ($count > 0) { ++$ref_error; $this->getRequest()->setError('grade_component/deleteEkskul/' . sfInflector::camelize($ref['table']), $count); } } if ($ref_error > 0) { $this->getRequest()->setError('grade_component/deleteEkskul', '_ERR_DELETE_ (' . $grade_component->toString() . ' - id:' . $grade_component->getId() . ')'); } else { $grade_component->delete(); } return $this->forward('grade_component', 'listEkskul'); }
public function executeShowEkskul() { $student_id = sfContext::getInstance()->getUser()->getAttribute('user_id', null, 'bo'); $student = StudentPeer::retrieveByPK($student_id); $this->forward404Unless($student); $grade_component = GradeComponentPeer::retrieveByPk($this->getRequestParameter('id')); $this->forward404Unless($grade_component); $academic_calendar = AcademicCalendarPeer::retrieveByPk($this->getRequestParameter('accal_id')); $this->forward404Unless($academic_calendar); $this->subtitle = $grade_component->toString() . ' - id:' . $grade_component->getId(); $actions = array(); $this->actions = $actions; if ($academic_calendar->getCourseModel() == 'A') { $actions2 = array(array('name' => '<span>Semester 1 ' . $academic_calendar->getParentName() . '</span>', 'url' => 'student_ekskul/list', 'color' => 'sun')); } else { $actions2 = array(array('name' => '<span>Semester 2 ' . $academic_calendar->getParentName() . '</span>', 'url' => 'student_ekskul/list2', 'color' => 'sun')); } array_push($actions2, array('name' => '<span>Detail Ekskul</span>', 'url' => 'student_ekskul/showEkskul?id=' . $grade_component->getId() . '&accal_id=' . $academic_calendar->getId(), 'color' => 'sun', 'type' => 'direct')); $this->actions2 = $actions2; $this->accal = $academic_calendar->getId(); $this->student = $student; $this->grade_component = $grade_component; }