当前位置: 首页>>代码示例>>PHP>>正文


PHP GradeSpecPeer::doCount方法代码示例

本文整理汇总了PHP中GradeSpecPeer::doCount方法的典型用法代码示例。如果您正苦于以下问题:PHP GradeSpecPeer::doCount方法的具体用法?PHP GradeSpecPeer::doCount怎么用?PHP GradeSpecPeer::doCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GradeSpecPeer的用法示例。


在下文中一共展示了GradeSpecPeer::doCount方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: executeUploadFinish

 public function executeUploadFinish()
 {
     $employee_id = sfContext::getInstance()->getUser()->getAttribute('user_id', null, 'bo');
     $employee = EmployeePeer::retrieveByPK($employee_id);
     $this->forward404Unless($employee);
     $this->employee_id = $employee_id;
     $this->employee = $employee;
     $course_schedule = CourseSchedulePeer::retrieveByPk($this->getRequestParameter('course_id'));
     $this->forward404Unless($course_schedule);
     $course_schedule_id = $course_schedule->getId();
     $actions = array();
     $this->actions = $actions;
     $this->subtitle = $course_schedule->getSubjectCurr()->getSubject()->getName() . ' - (' . $course_schedule->getClassGroup()->toString() . ' # ' . $course_schedule->getAcademicCalendar()->getName() . ')';
     $this->type = 'edit';
     $this->course_schedule = $course_schedule;
     $cr = new Criteria();
     $cr->add(GradeSpecPeer::PARENT, 1);
     $cr->addAscendingOrderByColumn(GradeSpecPeer::ID);
     $this->grade1 = GradeSpecPeer::doSelect($cr);
     $this->count1 = GradeSpecPeer::doCount($cr);
     $cw = new Criteria();
     $cw->add(GradeSpecPeer::PARENT, 7);
     $cw->addAscendingOrderByColumn(GradeSpecPeer::ID);
     $this->grade2 = GradeSpecPeer::doSelect($cw);
     $this->count2 = GradeSpecPeer::doCount($cw);
     $cm = new Criteria();
     $cm->addJoin(StudentAccalPeer::STUDENT_ID, VStudentActivePeer::ID);
     $cm->add(StudentAccalPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
     $cm->add(StudentAccalPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
     $c = new Criteria();
     $c->add(StudentAccalPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
     $c->add(StudentAccalPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
     $c->addJoin(VStudentActivePeer::ID, StudentAccalPeer::STUDENT_ID);
     $c->addJoin(StudentPeer::ID, VStudentActivePeer::ID);
     $c->addAscendingOrderByColumn(StudentPeer::CLASS_NAME);
     $rpp = $this->getRequestParameter('max_per_page', $this->getUser()->getAttribute('max_per_page', ParamsPeer::retrieveByCode('row_per_page')->getValue(), 'student'));
     $this->getUser()->setAttribute('max_per_page', $rpp, 'student');
     $pager = new sfPropelPager('Student', $rpp);
     $pager->setCriteria($c);
     $page = $this->getRequestParameter('page', $this->getUser()->getAttribute('page', 1, 'student'));
     $this->getUser()->setAttribute('page', $page, 'student');
     $pager->setPage($page);
     $pager->init();
     $this->pager = $pager;
     $this->student_count = StudentAccalPeer::doCount($cm);
 }
开发者ID:taryono,项目名称:school,代码行数:46,代码来源:actions.class.php

示例2: executeGetStudentScore

 public function executeGetStudentScore()
 {
     $student_id = $this->getRequestParameter('student_id');
     $student = StudentPeer::retrieveByPK($student_id);
     $this->forward404Unless($student);
     $counseling_id = $this->getRequestParameter('counseling_id');
     $counseling = CounselingPeer::retrieveByPK($counseling_id);
     $this->forward404Unless($counseling);
     $accal_id = $this->getRequestParameter('academic_calendar_id');
     $academic_calendar = AcademicCalendarPeer::retrieveByPK($accal_id);
     $this->forward404Unless($academic_calendar);
     ## Daftar Mata Pelajaran di Jadwal Pelajaran
     $cw = new Criteria();
     $cw->add(VCoursePeer::CLASS_GROUP_ID, $counseling->getClassGroupId());
     $cw->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
     $subjects = VCoursePeer::doSelect($cw);
     $subject_ids = array();
     foreach ($subjects as $subject) {
         $subject_ids[] = $subject->getSubjectCurrId();
     }
     $this->subjects = $subjects;
     ## Menentukan Aturan Penilaian
     $cd = new Criteria();
     #$cd->add(ScoreRulePeer::ACADEMIC_CALENDAR_ID, $counseling->getAcademicCalendarId());
     $cd->add(ClassGroupPeer::DEPARTMENT_ID, $counseling->getAcademicCalendar()->getDepartmentId());
     $cd->addJoin(ScoreRulePeer::CLASS_GROUP_ID, ClassGroupPeer::ID);
     $cd->add(ScoreRulePeer::TYPE, 2);
     $score_rule = ScoreRulePeer::doSelectOne($cd);
     $this->score_rule = $score_rule;
     ## Menentukan Aturan Penilaian Yang digunakan
     $cm = new Criteria();
     $cm->add(ScoreRuleSubjectPeer::SCORE_RULE_ID, $score_rule->getId(), Criteria::IN);
     $cm->add(ScoreRuleSubjectPeer::PUBLISHED, 1, Criteria::IN);
     $cm->add(ScoreRuleSubjectPeer::SUBJECT_CURR_ID, $subject_ids, Criteria::IN);
     $cm->addAscendingOrderByColumn(ScoreRuleSubjectPeer::SEQUENCE);
     $list_subs = ScoreRuleSubjectPeer::doSelect($cm);
     $subject_count = ScoreRuleSubjectPeer::doCount($cm);
     $this->list_subs = $list_subs;
     $this->subject_count = $subject_count;
     ## Mengelompokkan Penilaian Anak berdasarkan Tahun Ajaran dan Kelas
     $cr = new Criteria();
     $cr->add(StudentRaportPeer::CLASS_GROUP_ID, $counseling->getClassGroupId());
     $cr->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
     $cr->add(StudentRaportPeer::STUDENT_ID, $student->getId());
     $stugrades = StudentRaportPeer::doSelect($cr);
     $this->stugrades = $stugrades;
     $grades = array();
     $grade_avg = array();
     foreach ($stugrades as $stugrade) {
         $grades[$stugrade->getSubjectCurrId() . '#' . $stugrade->getGradeSpecId()] = $stugrade->getGrade();
         $grade_avg[$stugrade->getSubjectCurrId() . '#' . $stugrade->getGradeSpecId()] = (array_key_exists($stugrade->getsubjectCurrId() . '#' . $stugrade->getGradeSpecId(), $grade_avg) ? $grade_avg[$stugrade->getSubjectCurrId() . '#' . $stugrade->getGradeSpecId()] : 0) + $stugrade->getGrade();
     }
     $this->grades = $grades;
     $this->grade_avg = $grade_avg;
     $ct = new Criteria();
     $ct->add(GradeSpecPeer::PARENT, 1, Criteria::IN);
     $ct->addAscendingOrderByColumn(GradeSpecPeer::ID);
     $this->grade1 = GradeSpecPeer::doSelect($ct);
     $this->count1 = GradeSpecPeer::doCount($ct);
     $cte = new Criteria();
     $cte->add(GradeSpecPeer::PARENT, 7, Criteria::IN);
     $cte->addAscendingOrderByColumn(GradeSpecPeer::ID);
     $this->grade2 = GradeSpecPeer::doSelect($cte);
     $this->count2 = GradeSpecPeer::doCount($cte);
     $cw = new Criteria();
     $cw->add(CourseRegulationPeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
     $cw->add(CourseRegulationPeer::CLASS_GROUP_ID, $counseling->getClassGroupId());
     $c_regulations = CourseRegulationPeer::doSelect($cw);
     $this->c_regulations = $c_regulations;
     $course_reg = array();
     foreach ($c_regulations as $cr) {
         $course_reg[$cr->getSubjectCurrId()] = $cr->getKkm();
     }
     $this->course_reg = $course_reg;
     $actions = array();
     $this->actions = $actions;
     $this->counseling = $counseling;
     $this->subtitle = $academic_calendar->getName() . ' # Kelas : ' . $counseling->getClassGroup()->toString();
     $this->academic_calendar = $academic_calendar;
     $this->student = $student;
 }
开发者ID:taryono,项目名称:school,代码行数:81,代码来源:actions.class.php

示例3: executeListScoreAsCSV

 public function executeListScoreAsCSV()
 {
     $course_schedule = CourseSchedulePeer::retrieveByPk($this->getRequestParameter('course_id'));
     $this->forward404Unless($course_schedule);
     $course_schedule_id = $course_schedule->getId();
     $cr = new Criteria();
     $cr->add(GradeSpecPeer::PARENT, 1);
     $cr->addAscendingOrderByColumn(GradeSpecPeer::CODE);
     $this->grade1 = GradeSpecPeer::doSelect($cr);
     $this->count1 = GradeSpecPeer::doCount($cr);
     $cw = new Criteria();
     $cw->add(GradeSpecPeer::PARENT, 7);
     $cw->addAscendingOrderByColumn(GradeSpecPeer::CODE);
     $this->grade2 = GradeSpecPeer::doSelect($cw);
     $this->count2 = GradeSpecPeer::doCount($cw);
     $cm = new Criteria();
     $cm->addJoin(StudentAccalPeer::STUDENT_ID, VStudentActivePeer::ID);
     $cm->add(StudentAccalPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
     $cm->add(StudentAccalPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
     $c = new Criteria();
     $c->add(StudentAccalPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
     $c->add(StudentAccalPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
     $c->addJoin(VStudentActivePeer::ID, StudentAccalPeer::STUDENT_ID);
     $c->addJoin(StudentPeer::ID, VStudentActivePeer::ID);
     $c->addAscendingOrderByColumn(StudentPeer::CLASS_NAME);
     $rpp = $this->getRequestParameter('max_per_page', $this->getUser()->getAttribute('max_per_page', ParamsPeer::retrieveByCode('row_per_page')->getValue(), 'student'));
     $this->getUser()->setAttribute('max_per_page', $rpp, 'student');
     $pager = new sfPropelPager('Student', $rpp);
     $pager->setCriteria($c);
     $page = $this->getRequestParameter('page', $this->getUser()->getAttribute('page', 1, 'student'));
     $this->getUser()->setAttribute('page', $page, 'student');
     $pager->setPage($page);
     $pager->init();
     $this->pager = $pager;
     $this->student_count = StudentAccalPeer::doCount($cm);
     $this->subtitle = $course_schedule->getSubjectCurr()->getSubject()->getName() . ' - ' . $course_schedule->getClassGroup()->toString();
     $this->course_schedule = $course_schedule;
     $this->setLayout(false);
     $this->getResponse()->setHttpHeader('Content-Type', 'text/csv');
     $this->getResponse()->setHttpHeader('Content-Disposition', 'attachment; filename="' . $this->getModuleName() . '.csv"');
 }
开发者ID:taryono,项目名称:school,代码行数:41,代码来源:actions.class.php

示例4: executeGetListFinalAll

 public function executeGetListFinalAll()
 {
     $academic_calendar_id = $this->getRequestParameter('academic_calendar_id');
     $academic_calendar = AcademicCalendarPeer::retrieveByPK($academic_calendar_id);
     $this->academic_calendar = $academic_calendar;
     $student_id = $this->getRequestParameter('student_id');
     $student = StudentPeer::retrieveByPK($student_id);
     $this->forward404Unless($student);
     $this->student = $student;
     $c = new Criteria();
     $c->add(StudentAccalPeer::STUDENT_ID, $student_id, Criteria::IN);
     $c->add(StudentAccalPeer::ACADEMIC_CALENDAR_ID, $academic_calendar_id, Criteria::IN);
     $stu_accal = StudentAccalPeer::doSelectOne($c);
     $this->stu_accal = $stu_accal;
     $cw = new Criteria();
     $cw->add(CounselingPeer::CLASS_GROUP_ID, $stu_accal->getClassGroupId());
     $cw->add(CounselingPeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getParent());
     $counseling = CounselingPeer::doSelectOne($cw);
     $this->counseling = $counseling;
     $cr = new Criteria();
     $cr->add(GradeSpecPeer::PARENT, 1);
     $this->grade1 = GradeSpecPeer::doSelect($cr);
     $this->count1 = GradeSpecPeer::doCount($cr);
     $crew = new Criteria();
     $crew->add(GradeSpecPeer::PARENT, 7);
     $this->grade2 = GradeSpecPeer::doSelect($crew);
     $this->count2 = GradeSpecPeer::doCount($crew);
     #SMP
     if ($academic_calendar->getDepartmentId() == 2) {
         $cb = new Criteria();
         $cb->add(VCoursePeer::CLASS_GROUP_ID, $stu_accal->getClassGroupId(), Criteria::IN);
         $cb->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId(), Criteria::IN);
         $cb->add(VCoursePeer::SUBJECT_CURR_ID, 316, Criteria::NOT_IN);
         $cb->addAscendingOrderByColumn(VCoursePeer::CODE);
         $this->subjects = VCoursePeer::doSelect($cb);
         $this->subject_count = VCoursePeer::doCount($cb);
         #SD
     } elseif ($academic_calendar->getDepartmentId() == 3) {
         $cb = new Criteria();
         $cb->add(VCoursePeer::CLASS_GROUP_ID, $stu_accal->getClassGroupId(), Criteria::IN);
         $cb->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId(), Criteria::IN);
         $cb->add(VCoursePeer::SUBJECT_GROUP_ID, 7, Criteria::IN);
         $cb->add(VCoursePeer::SUBJECT_CURR_ID, 319, Criteria::NOT_IN);
         $cb->add(VCoursePeer::SUBJECT_CURR_ID, 333, Criteria::NOT_IN);
         $cb->addAscendingOrderByColumn(VCoursePeer::CODE);
         $this->subjects7 = VCoursePeer::doSelect($cb);
         $subject_count7 = VCoursePeer::doCount($cb);
         $this->subject_count7 = $subject_count7;
         $cm = new Criteria();
         $cm->add(VCoursePeer::CLASS_GROUP_ID, $stu_accal->getClassGroupId(), Criteria::IN);
         $cm->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId(), Criteria::IN);
         $cm->add(VCoursePeer::SUBJECT_GROUP_ID, 8, Criteria::IN);
         $cm->addAscendingOrderByColumn(VCoursePeer::CODE);
         $this->subjects8 = VCoursePeer::doSelect($cm);
         $subject_count8 = VCoursePeer::doCount($cm);
         $this->subject_count8 = $subject_count8;
     }
     $rpp = $this->getRequestParameter('max_per_page', 999);
     $pager = new sfPropelPager('VCourse', $rpp);
     $pager->setCriteria($c);
     $pager->setPage($this->getRequestParameter('page', 1));
     $pager->init();
     $this->pager = $pager;
     $actions = array(array());
     $this->actions = $actions;
 }
开发者ID:taryono,项目名称:school,代码行数:66,代码来源:actions.class.php

示例5: countGradeSpecsRelatedByParent

 public function countGradeSpecsRelatedByParent($criteria = null, $distinct = false, $con = null)
 {
     include_once 'lib/model/om/BaseGradeSpecPeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     $criteria->add(GradeSpecPeer::PARENT, $this->getId());
     return GradeSpecPeer::doCount($criteria, $distinct, $con);
 }
开发者ID:taryono,项目名称:school,代码行数:11,代码来源:BaseGradeSpec.php

示例6: executePrintMiddle

 public function executePrintMiddle()
 {
     $counseling_id = $this->getRequestParameter('counseling_id');
     $counseling = CounselingPeer::retrieveByPK($counseling_id);
     $this->forward404Unless($counseling);
     $academic_calendar = AcademicCalendarPeer::retrieveByPK($this->getRequestParameter('accal_id'));
     $this->forward404Unless($academic_calendar);
     $time = $this->getRequestParameter('time');
     $time2 = $this->getRequestParameter('time2');
     $tgl = $this->getRequestParameter('tgl_cetak');
     $c = new Criteria();
     $c->add(TempTablePeer::COUNSELING_ID, $counseling->getId());
     $c->add(TempTablePeer::TIME, $time);
     $c->addJoin(VStudentActivePeer::ID, TempTablePeer::STUDENT_ID);
     $c->addAscendingOrderByColumn(VStudentActivePeer::CLASS_NAME);
     $students = VStudentActivePeer::doSelect($c);
     $this->forward404Unless($students);
     $co = new Criteria();
     $co->add(VCoursePeer::CLASS_GROUP_ID, $counseling->getClassGroupId());
     $co->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
     $cton1 = $co->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 319, Criteria::NOT_IN);
     $cton2 = $co->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 333, Criteria::NOT_IN);
     $cton1->addAnd($cton2);
     $co->add($cton1);
     $co->addAscendingOrderByColumn(VCoursePeer::CODE);
     $this->subjects = VCoursePeer::doSelect($co);
     $subject_count = VCoursePeer::doCount($co);
     $this->subject_count = $subject_count;
     $cw = new Criteria();
     $cw->add(VCoursePeer::CLASS_GROUP_ID, $counseling->getClassGroupId(), Criteria::IN);
     $cw->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId(), Criteria::IN);
     $cton1 = $cw->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 350, Criteria::IN);
     $cton2 = $cw->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 351, Criteria::IN);
     $cton3 = $cw->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 346, Criteria::IN);
     $cton4 = $cw->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 339, Criteria::IN);
     $cton5 = $cw->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 340, Criteria::IN);
     $cton6 = $cw->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 337, Criteria::IN);
     $cton5->addOr($cton6);
     $cton4->addOr($cton5);
     $cton3->addOr($cton4);
     $cton2->addOr($cton3);
     $cton1->addOr($cton2);
     $cw->add($cton1);
     $cw->addAscendingOrderByColumn(VCoursePeer::CODE);
     $this->subjects1 = VCoursePeer::doSelect($cw);
     $subject_count1 = VCoursePeer::doCount($cw);
     $this->subject_count1 = $subject_count1;
     $cm = new Criteria();
     $cm->add(VCoursePeer::CLASS_GROUP_ID, $counseling->getClassGroupId(), Criteria::IN);
     $cm->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId(), Criteria::IN);
     $cton1 = $cm->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 353, Criteria::IN);
     $cton2 = $cm->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 354, Criteria::IN);
     $cton1->addOr($cton2);
     $cm->add($cton1);
     $cm->addAscendingOrderByColumn(VCoursePeer::CODE);
     $this->ipas = VCoursePeer::doSelect($cm);
     $ipa_count = VCoursePeer::doCount($cm);
     $this->ipa_count = $ipa_count;
     $cl = new Criteria();
     $cl->add(VCoursePeer::CLASS_GROUP_ID, $counseling->getClassGroupId(), Criteria::IN);
     $cl->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId(), Criteria::IN);
     $cton1 = $cl->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 343, Criteria::IN);
     $cton2 = $cl->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 338, Criteria::IN);
     $cton3 = $cl->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 347, Criteria::IN);
     $cton2->addOr($cton3);
     $cton1->addOr($cton2);
     $cl->add($cton1);
     $cl->addAscendingOrderByColumn(VCoursePeer::CODE);
     $this->ips = VCoursePeer::doSelect($cl);
     $ips_count = VCoursePeer::doCount($cl);
     $this->ips_count = $ips_count;
     $cd = new Criteria();
     $cd->add(VCoursePeer::CLASS_GROUP_ID, $counseling->getClassGroupId(), Criteria::IN);
     $cd->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId(), Criteria::IN);
     $cton1 = $cd->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 352, Criteria::IN);
     $cton2 = $cd->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 349, Criteria::IN);
     $cton3 = $cd->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 348, Criteria::IN);
     $cton4 = $cd->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 341, Criteria::IN);
     $cton5 = $cd->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 355, Criteria::IN);
     $cton4->addOr($cton5);
     $cton3->addOr($cton4);
     $cton2->addOr($cton3);
     $cton1->addOr($cton2);
     $cd->add($cton1);
     $cd->addAscendingOrderByColumn(VCoursePeer::CODE);
     $this->subjects2 = VCoursePeer::doSelect($cd);
     $subject_count2 = VCoursePeer::doCount($cd);
     $this->subject_count2 = $subject_count2;
     $cb = new Criteria();
     $cb->add(VCoursePeer::CLASS_GROUP_ID, $counseling->getClassGroupId(), Criteria::IN);
     $cb->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId(), Criteria::IN);
     $cb->add(VCoursePeer::SUBJECT_GROUP_ID, 7, Criteria::IN);
     $cb->add(VCoursePeer::SUBJECT_CURR_ID, 319, Criteria::NOT_IN);
     $cb->add(VCoursePeer::SUBJECT_CURR_ID, 333, Criteria::NOT_IN);
     $cb->addAscendingOrderByColumn(VCoursePeer::CODE);
     $this->subjects7 = VCoursePeer::doSelect($cb);
     $subject_count7 = VCoursePeer::doCount($cb);
     $this->subject_count7 = $subject_count7;
     $crit = new Criteria();
     $crit->add(VCoursePeer::CLASS_GROUP_ID, $counseling->getClassGroupId());
//.........这里部分代码省略.........
开发者ID:taryono,项目名称:school,代码行数:101,代码来源:actions.class.php

示例7: executeListHistoryScore

 public function executeListHistoryScore()
 {
     $student_id = sfContext::getInstance()->getUser()->getAttribute('user_id', null, 'bo');
     $student = StudentPeer::retrieveByPK($student_id);
     $this->forward404Unless($student);
     $course_schedule = CourseSchedulePeer::retrieveByPk($this->getRequestParameter('course_id'));
     $this->forward404Unless($course_schedule);
     $course_schedule_id = $course_schedule->getId();
     $c = new Criteria();
     $c->addJoin(StudentAccalPeer::STUDENT_ID, VStudentActivePeer::ID);
     $c->add(StudentAccalPeer::STUDENT_ID, $student->getId());
     $c->add(StudentAccalPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
     $c->add(StudentAccalPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
     $student_accal = StudentAccalPeer::doSelectOne($c);
     $this->forward404Unless($student_accal);
     $this->student_accal = $student_accal;
     $cr = new Criteria();
     $cr->add(GradeSpecPeer::PARENT, 1);
     $this->grade1 = GradeSpecPeer::doSelect($cr);
     $this->count1 = GradeSpecPeer::doCount($cr);
     $crew = new Criteria();
     $crew->add(GradeSpecPeer::PARENT, 7);
     $this->grade2 = GradeSpecPeer::doSelect($crew);
     $this->count2 = GradeSpecPeer::doCount($crew);
     $actions = array();
     $this->actions = $actions;
     $this->subtitle = $course_schedule->getSubjectCurr()->getSubject()->getName() . ' - ' . $course_schedule->getClassGroup()->toString();
     $this->type = 'list';
     $this->course_schedule = $course_schedule;
     $this->course_schedule_id = $course_schedule_id;
     $this->student = $student;
     $actions2 = array(array('name' => '<span>' . $course_schedule->getAcademicCalendar()->getName() . '</span>', 'url' => 'student_agenda/listHistory', 'color' => 'sun'));
     array_push($actions2, array('name' => '<span>Agenda Kelas</span>', 'url' => 'student_agenda/listHistoryAgenda?course_id=' . $course_schedule->getId(), 'color' => 'sun'));
     array_push($actions2, array('name' => '<span>Absensi</span>', 'url' => 'student_agenda/listHistoryAbsence?course_id=' . $course_schedule->getId(), 'color' => 'sun'));
     array_push($actions2, array('name' => '<span>Jadwal Tugas/Ulangan/PR</span>', 'url' => 'student_agenda/listHistoryTest?course_id=' . $course_schedule->getId(), 'color' => 'sun'));
     array_push($actions2, array('name' => '<span>Penilaian</span>', 'url' => 'student_agenda/listHistoryScore?course_id=' . $course_schedule->getId(), 'color' => 'sun', 'type' => 'direct'));
     $this->actions2 = $actions2;
 }
开发者ID:taryono,项目名称:school,代码行数:38,代码来源:actions.class.php

示例8: executeListAllAfective

 public function executeListAllAfective()
 {
     $employee_id = sfContext::getInstance()->getUser()->getAttribute('user_id', null, 'bo');
     $employee = EmployeePeer::retrieveByPK($employee_id);
     $this->forward404Unless($employee);
     $this->employee_id = $employee_id;
     $course_schedule = CourseSchedulePeer::retrieveByPk($this->getRequestParameter('course_id'));
     $this->forward404Unless($course_schedule);
     $course_schedule_id = $course_schedule->getId();
     $cr = new Criteria();
     $cr->add(GradeSpecPeer::PARENT, 130, Criteria::IN);
     $cr->addAscendingOrderByColumn(GradeSpecPeer::ID);
     $this->grade1 = GradeSpecPeer::doSelect($cr);
     $this->count1 = GradeSpecPeer::doCount($cr);
     $c = new Criteria();
     $c->addJoin(VStudentAccalPeer::STUDENT_ID, VStudentActivePeer::ID);
     $c->add(VStudentAccalPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
     $c->add(VStudentAccalPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
     $c->addAscendingOrderByColumn(VStudentAccalPeer::CLASS_NAME);
     $rpp = $this->getRequestParameter('max_per_page', $this->getUser()->getAttribute('max_per_page', ParamsPeer::retrieveByCode('row_per_page')->getValue(), 'student'));
     $this->getUser()->setAttribute('max_per_page', $rpp, 'student');
     $pager = new sfPropelPager('VStudentAccal', $rpp);
     $pager->setCriteria($c);
     $page = $this->getRequestParameter('page', $this->getUser()->getAttribute('page', 1, 'student'));
     $this->getUser()->setAttribute('page', $page, 'student');
     $pager->setPage($page);
     $pager->init();
     $this->pager = $pager;
     $this->student_count = VStudentAccalPeer::doCount($c);
     $actions = array(array('name' => 'save', 'type' => 'submit', 'options' => array('class' => 'save_button', 'onclick' => "action_type.value=this.value")));
     $this->actions = $actions;
     $this->subtitle = $course_schedule->getSubjectCurr()->getSubject()->getName() . ' - (' . $course_schedule->getClassGroup()->toString() . ' # ' . $course_schedule->getAcademicCalendar()->getName() . ')';
     $this->type = 'edit';
     $this->course_schedule = $course_schedule;
     ## Mengelompokkan Penilaian Anak berdasarkan Tahun Ajaran dan Kelas
     $cr = new Criteria();
     $cr->add(StudentGradeRaportPeer::COURSE_SCHEDULE_ID, $course_schedule->getId());
     $stugrades = StudentGradeRaportPeer::doSelect($cr);
     $this->stugrades = $stugrades;
     $grades = array();
     $grade_avg = array();
     foreach ($stugrades as $stugrade) {
         $grades[$stugrade->getStudentAccalId() . '#' . $stugrade->getGradeSpecId()] = $stugrade->getGrade();
         $grade_avg[$stugrade->getGradeSpecId()] = (array_key_exists($stugrade->getGradeSpecId(), $grade_avg) ? $grade_avg[$stugrade->getGradeSpecId()] : 0) + $stugrade->getGrade();
     }
     $this->grades = $grades;
     $this->grade_avg = $grade_avg;
     $cem = new Criteria();
     $cem->add(CourseRegulationPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
     $cem->add(CourseRegulationPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
     $cem->add(CourseRegulationPeer::SUBJECT_CURR_ID, $course_schedule->getSubjectCurrId());
     $course_reg = CourseRegulationPeer::doSelectOne($cem);
     $this->course_reg = $course_reg;
     $actions2 = array(array('name' => '<span>Nilai Sikap Per Kategori</span>', 'url' => 'course_afective/listAfective?course_id=' . $course_schedule->getId(), 'color' => 'sky'));
     array_unshift($actions2, array('name' => '<span>' . $course_schedule->getAcademicCalendar()->getName() . '</span>', 'url' => 'course_score_new/list', 'color' => 'sky'));
     array_push($actions2, array('name' => '<span>Nilai Sikap Keseluruhan</span>', 'url' => 'course_afective/listAllAfective?course_id=' . $course_schedule->getId(), 'color' => 'sun', 'type' => 'direct'));
     array_push($actions2, array('name' => '<span>Rekap Nilai Sikap</span>', 'url' => 'course_afective/listRecaptAfective?course_id=' . $course_schedule->getId(), 'color' => 'sky'));
     $this->actions2 = $actions2;
     $this->tipe = 'afective';
     $this->title = 'Nilai Sikap Keseluruhan';
     $this->setTemplate('listAll');
 }
开发者ID:taryono,项目名称:school,代码行数:62,代码来源:actions.class.php

示例9: executePrintTryout

 public function executePrintTryout()
 {
     $course_schedule = CourseSchedulePeer::retrieveByPk($this->getRequestParameter('course_id'));
     $this->forward404Unless($course_schedule);
     $course_schedule_id = $course_schedule->getId();
     $cr = new Criteria();
     $cr->add(GradeSpecPeer::PARENT, 45);
     $this->grade = GradeSpecPeer::doSelect($cr);
     $this->count = GradeSpecPeer::doCount($cr);
     $cd = new Criteria();
     $cd->add(StudentTryoutPeer::SUBJECT_CURR_ID, $course_schedule->getSubjectCurrId());
     $cd->add(StudentTryoutPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
     $cd->add(StudentTryoutPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
     $stugrades = StudentTryoutPeer::doSelect($cd);
     $grades = array();
     $grade_avg = array();
     foreach ($stugrades as $stugrade) {
         $grades[$stugrade->getStudentId() . '#' . $stugrade->getGradeSpecId()] = $stugrade->getGrade();
         $grade_avg[$stugrade->getStudentId() . '#' . $stugrade->getGradeSpecId()] = (array_key_exists($stugrade->getStudentId() . '#' . $stugrade->getGradeSpecId(), $grade_avg) ? $grade_avg[$stugrade->getStudentId() . '#' . $stugrade->getGradeSpecId()] : 0) + $stugrade->getGrade();
     }
     $this->grades = $grades;
     $this->grade_avg = $grade_avg;
     $c = new Criteria();
     $c->addJoin(VStudentAccalPeer::STUDENT_ID, VStudentActivePeer::ID);
     $c->add(VStudentAccalPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
     $c->add(VStudentAccalPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
     $c->addAscendingOrderByColumn(VStudentAccalPeer::CLASS_NAME);
     $rpp = $this->getRequestParameter('max_per_page', $this->getUser()->getAttribute('max_per_page', ParamsPeer::retrieveByCode('row_per_page')->getValue(), 'student'));
     $this->getUser()->setAttribute('max_per_page', $rpp, 'student');
     $pager = new sfPropelPager('VStudentAccal', $rpp);
     $pager->setCriteria($c);
     $page = $this->getRequestParameter('page', $this->getUser()->getAttribute('page', 1, 'student'));
     $this->getUser()->setAttribute('page', $page, 'student');
     $pager->setPage($page);
     $pager->init();
     $this->pager = $pager;
     $this->student_count = VStudentAccalPeer::doCount($c);
     $this->subtitle = $course_schedule->getSubjectCurr()->getSubject()->getName() . ' - ' . $course_schedule->getClassGroup()->toString();
     $this->course_schedule = $course_schedule;
     $cem = new Criteria();
     $cem->add(CourseRegulationPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
     $cem->add(CourseRegulationPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
     $cem->add(CourseRegulationPeer::SUBJECT_CURR_ID, $course_schedule->getSubjectCurrId());
     $course_reg = CourseRegulationPeer::doSelectOne($cem);
     $this->course_reg = $course_reg;
     $this->papersize = 'a4';
     $this->setLayout(false);
     $this->orientation = 'potrait';
     $this->setViewClass('sfDomPDF');
 }
开发者ID:taryono,项目名称:school,代码行数:50,代码来源:actions.class.php

示例10: executeListFullTryout

 public function executeListFullTryout()
 {
     $counseling = CounselingPeer::retrieveByPk($this->getRequestParameter('counseling_id'));
     $this->forward404Unless($counseling);
     $academic_calendar = AcademicCalendarPeer::retrieveByPk($this->getRequestParameter('accal_id'));
     $this->forward404Unless($academic_calendar);
     $c = new Criteria();
     $c->add(StudentAccalPeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
     $c->add(StudentAccalPeer::CLASS_GROUP_ID, $counseling->getClassGroupId());
     $c->addJoin(StudentPeer::ID, StudentAccalPeer::STUDENT_ID);
     $c->add(StudentPeer::STATUS, 2, Criteria::NOT_EQUAL);
     $c->add(StudentPeer::STATUS, 3, Criteria::NOT_EQUAL);
     $c->addAscendingOrderByColumn(StudentPeer::CLASS_NAME);
     $this->students = StudentPeer::doSelect($c);
     $this->student_count = StudentPeer::doCount($c);
     $rpp = $this->getRequestParameter('max_per_page', 999);
     $pager = new sfPropelPager('Student', $rpp);
     $pager->setCriteria($c);
     $pager->setPage($this->getRequestParameter('page', 1));
     $pager->init();
     $this->pager = $pager;
     $grade_id = $this->getRequestParameter('grade_id');
     $this->grade_id = $grade_id;
     $cr = new Criteria();
     $cr->add(GradeSpecPeer::PARENT, 45, Criteria::IN);
     $grade1 = GradeSpecPeer::doSelect($cr);
     $count1 = GradeSpecPeer::doCount($cr);
     $this->grade1 = $grade1;
     $this->count1 = $count1;
     $grade_current = GradeSpecPeer::retrieveByPk($grade_id);
     $this->counseling = $counseling;
     $this->academic_calendar = $academic_calendar;
     $this->subtitle = $grade_current->getCode() . ' # ' . $counseling->getClassGroup()->getName() . ' - ' . $academic_calendar->toString();
     #SMP
     if ($academic_calendar->getDepartmentId() == 2) {
         $cw = new Criteria();
         $cw->add(VCoursePeer::CLASS_GROUP_ID, $counseling->getClassGroupId(), Criteria::IN);
         $cw->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId(), Criteria::IN);
         $cton1 = $cw->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 350, Criteria::IN);
         $cton2 = $cw->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 351, Criteria::IN);
         $cton3 = $cw->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 346, Criteria::IN);
         $cton4 = $cw->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 339, Criteria::IN);
         $cton5 = $cw->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 340, Criteria::IN);
         $cton6 = $cw->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 337, Criteria::IN);
         $cton5->addOr($cton6);
         $cton4->addOr($cton5);
         $cton3->addOr($cton4);
         $cton2->addOr($cton3);
         $cton1->addOr($cton2);
         $cw->add($cton1);
         $cw->addAscendingOrderByColumn(VCoursePeer::CODE);
         $this->smp_subjects = VCoursePeer::doSelect($cw);
         $this->smp_count = VCoursePeer::doCount($cw);
         $cd = new Criteria();
         $cd->add(VCoursePeer::CLASS_GROUP_ID, $counseling->getClassGroupId(), Criteria::IN);
         $cd->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId(), Criteria::IN);
         $cton1 = $cd->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 352, Criteria::IN);
         $cton2 = $cd->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 349, Criteria::IN);
         $cton3 = $cd->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 348, Criteria::IN);
         $cton4 = $cd->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 341, Criteria::IN);
         $cton5 = $cd->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 355, Criteria::IN);
         $cton4->addOr($cton5);
         $cton3->addOr($cton4);
         $cton2->addOr($cton3);
         $cton1->addOr($cton2);
         $cd->add($cton1);
         $cd->addAscendingOrderByColumn(VCoursePeer::CODE);
         $this->smp_subjects2 = VCoursePeer::doSelect($cd);
         $this->smp_count2 = VCoursePeer::doCount($cd);
         $cm = new Criteria();
         $cm->add(VCoursePeer::CLASS_GROUP_ID, $counseling->getClassGroupId(), Criteria::IN);
         $cm->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId(), Criteria::IN);
         $cton1 = $cm->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 353, Criteria::IN);
         $cton2 = $cm->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 354, Criteria::IN);
         $cton1->addOr($cton2);
         $cm->add($cton1);
         $cm->addAscendingOrderByColumn(VCoursePeer::CODE);
         $this->ipas = VCoursePeer::doSelect($cm);
         $this->ipa_count = VCoursePeer::doCount($cm);
         $cl = new Criteria();
         $cl->add(VCoursePeer::CLASS_GROUP_ID, $counseling->getClassGroupId(), Criteria::IN);
         $cl->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId(), Criteria::IN);
         $cl->add(VCoursePeer::SUBJECT_CURR_ID, 371, Criteria::IN);
         $cl->addAscendingOrderByColumn(VCoursePeer::CODE);
         $this->ips = VCoursePeer::doSelect($cl);
         $this->ips_count = VCoursePeer::doCount($cl);
         #SD
     } else {
         if ($counseling->getClassGroup()->getParent() == 54) {
             $cw = new Criteria();
             $cw->add(VCoursePeer::CLASS_GROUP_ID, $counseling->getClassGroupId());
             $cw->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
             $cton1 = $cw->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 319, Criteria::NOT_IN);
             $cton2 = $cw->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 332, Criteria::NOT_IN);
             $cton1->addAnd($cton2);
             $cw->add($cton1);
             $cw->addAscendingOrderByColumn(VCoursePeer::CODE);
             $this->sd_subjects = VCoursePeer::doSelect($cw);
             $this->sd_count = VCoursePeer::doCount($cw);
         } else {
//.........这里部分代码省略.........
开发者ID:taryono,项目名称:school,代码行数:101,代码来源:actions.class.php

示例11: executeListMiddle

 public function executeListMiddle()
 {
     $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);
     $student_id = $this->getRequestParameter('student_id');
     $student = StudentPeer::retrieveByPK($this->getRequestParameter('student_id'));
     $this->forward404Unless($student);
     if ($employee->getDepartmentId() == 3) {
         $c = new Criteria();
         $c->add(VCoursePeer::CLASS_GROUP_ID, $student->getClassGroupId());
         $c->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
         $c->addAscendingOrderByColumn(VCoursePeer::CODE);
         $this->subjects = VCoursePeer::doSelect($c);
         $subject_count = VCoursePeer::doCount($c);
         $this->subject_count = $subject_count;
         $c = new Criteria();
         $c->add(VCoursePeer::CLASS_GROUP_ID, $student->getClassGroupId(), Criteria::IN);
         $c->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId(), Criteria::IN);
         $c->add(VCoursePeer::SUBJECT_GROUP_ID, 7, Criteria::IN);
         $c->add(VCoursePeer::SUBJECT_CURR_ID, 319, Criteria::NOT_IN);
         $c->addAscendingOrderByColumn(VCoursePeer::CODE);
         $this->subjects7 = VCoursePeer::doSelect($c);
         $subject_count7 = VCoursePeer::doCount($c);
         $this->subject_count7 = $subject_count7;
     } else {
         $c = new Criteria();
         $c->add(VCoursePeer::CLASS_GROUP_ID, $student->getClassGroupId(), Criteria::IN);
         $c->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId(), Criteria::IN);
         $c->add(VCoursePeer::SUBJECT_CURR_ID, 316, Criteria::NOT_IN);
         $c->addAscendingOrderByColumn(VCoursePeer::CODE);
         $this->subjects = VCoursePeer::doSelect($c);
         $subject_count = VCoursePeer::doCount($c);
         $this->subject_count = $subject_count;
         $c = new Criteria();
         $c->add(VCoursePeer::CLASS_GROUP_ID, $student->getClassGroupId(), Criteria::IN);
         $c->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId(), Criteria::IN);
         $c->add(VCoursePeer::SUBJECT_GROUP_ID, 7, Criteria::IN);
         $c->add(VCoursePeer::SUBJECT_CURR_ID, 316, Criteria::NOT_IN);
         $c->addAscendingOrderByColumn(VCoursePeer::CODE);
         $this->subjects7 = VCoursePeer::doSelect($c);
         $subject_count7 = VCoursePeer::doCount($c);
         $this->subject_count7 = $subject_count7;
     }
     $c = new Criteria();
     $c->add(VCoursePeer::CLASS_GROUP_ID, $student->getClassGroupId());
     $c->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
     $c->add(VCoursePeer::SUBJECT_GROUP_ID, 8);
     $c->addAscendingOrderByColumn(VCoursePeer::CODE);
     $this->subjects8 = VCoursePeer::doSelect($c);
     $subject_count8 = VCoursePeer::doCount($c);
     $this->subject_count8 = $subject_count8;
     $cr = new Criteria();
     $cr->add(GradeSpecPeer::PARENT, 1);
     $this->grade1 = GradeSpecPeer::doSelect($cr);
     $this->count1 = GradeSpecPeer::doCount($cr);
     $cr = new Criteria();
     $cr->add(GradeSpecPeer::PARENT, 7);
     $this->grade2 = GradeSpecPeer::doSelect($cr);
     $this->count2 = GradeSpecPeer::doCount($cr);
     $cw = new Criteria();
     $cton1 = $cw->getNewCriterion(GradeSpecPeer::PARENT, 1, Criteria::IN);
     $cton2 = $cw->getNewCriterion(GradeSpecPeer::ID, 19, Criteria::NOT_IN);
     $cton3 = $cw->getNewCriterion(GradeSpecPeer::ID, 25, Criteria::NOT_IN);
     $cton2->addAnd($cton3);
     $cton1->addAnd($cton2);
     $cw->add($cton1);
     $this->gradeSD1 = GradeSpecPeer::doSelect($cw);
     $this->countSD1 = GradeSpecPeer::doCount($cw);
     $cw = new Criteria();
     $cton1 = $cw->getNewCriterion(GradeSpecPeer::PARENT, 7, Criteria::IN);
     $cton2 = $cw->getNewCriterion(GradeSpecPeer::ID, 18, Criteria::NOT_IN);
     $cton3 = $cw->getNewCriterion(GradeSpecPeer::ID, 26, Criteria::NOT_IN);
     $cton2->addAnd($cton3);
     $cton1->addAnd($cton2);
     $cw->add($cton1);
     $this->gradeSD2 = GradeSpecPeer::doSelect($cw);
     $this->countSD2 = GradeSpecPeer::doCount($cw);
     $crit = new Criteria();
     $crit->add(GradeSpecPeer::PARENT, 1);
     $cton1 = $crit->getNewCriterion(GradeSpecPeer::ID, 53, Criteria::NOT_IN);
     $cton2 = $crit->getNewCriterion(GradeSpecPeer::ID, 54, Criteria::NOT_IN);
     $cton1->addAnd($cton2);
     $crit->add($cton1);
     $this->gradePdf1 = GradeSpecPeer::doSelect($crit);
     $this->countPdf1 = GradeSpecPeer::doCount($crit);
     $crew = new Criteria();
     $crew->add(GradeSpecPeer::PARENT, 7);
     $cton1 = $crew->getNewCriterion(GradeSpecPeer::ID, 55, Criteria::NOT_IN);
     $cton2 = $crew->getNewCriterion(GradeSpecPeer::ID, 56, Criteria::NOT_IN);
     $cton1->addAnd($cton2);
     $crew->add($cton1);
     $this->gradePdf2 = GradeSpecPeer::doSelect($crew);
     $this->countPdf2 = GradeSpecPeer::doCount($crew);
//.........这里部分代码省略.........
开发者ID:taryono,项目名称:school,代码行数:101,代码来源:actions.class.php

示例12: executeEditFromScore

 public function executeEditFromScore()
 {
     $student_id = $this->getRequestParameter('student_id');
     $student = StudentPeer::retrieveByPK($student_id);
     $this->forward404Unless($student);
     $this->student = $student;
     $group_id = $this->getContext()->getUser()->getAttribute('group_id', null, 'bo');
     $c = new Criteria();
     $c->add(JobPeer::CODE, $this->getModuleName());
     $job = JobPeer::doSelectOne($c);
     $acl = AclPeer::retrieveByPK($group_id, $job->getId());
     if (!$acl) {
         $this->forward('default', 'error404');
     }
     $this->can_add = $acl->getAddPriv() == 1;
     $this->can_edit = $acl->getEditPriv() == 1;
     $this->can_remove = $acl->getRemovePriv() == 1;
     $c = new Criteria();
     $c->add(VCoursePeer::CLASS_GROUP_ID, $student->getClassGroupId());
     $c->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $student->getAcademicCalendarId());
     $c->addAscendingOrderByColumn(VCoursePeer::SUBJECT_CURR_ID);
     $this->subjects = VCoursePeer::doSelect($c);
     $this->subject_count = VCoursePeer::doCount($c);
     $cr = new Criteria();
     $cr->add(GradeSpecPeer::PARENT, 1);
     $this->grade1 = GradeSpecPeer::doSelect($cr);
     $this->count1 = GradeSpecPeer::doCount($cr);
     $cr = new Criteria();
     $cr->add(GradeSpecPeer::PARENT, 7);
     $this->grade2 = GradeSpecPeer::doSelect($cr);
     $this->count2 = GradeSpecPeer::doCount($cr);
     $rpp = $this->getRequestParameter('max_per_page', 999);
     $pager = new sfPropelPager('VCourse', $rpp);
     $pager->setCriteria($c);
     $pager->setPage($this->getRequestParameter('page', 1));
     $pager->init();
     $this->pager = $pager;
 }
开发者ID:taryono,项目名称:school,代码行数:38,代码来源:actions.class.php

示例13: __

                    <?php 
if ($pager->getNbResults() < 1) {
    ?>
                        <tr class="list"><td colspan="100"><div class="no_record"><?php 
    echo __('No record found');
    ?>
</div></td></tr>
                    <?php 
} else {
    ?>
                        <?php 
    $i = 0;
    foreach ($pager->getResults() as $grade_spec) {
        $c = new Criteria();
        $c->add(GradeSpecPeer::PARENT, $grade_spec->getId());
        $grade_spec->child = GradeSpecPeer::doCount($c);
        ?>
                        <tr id='cs_<?php 
        echo $grade_spec->getId();
        ?>
' class="list<?php 
        ++$i;
        if ($i % 2 == 0) {
            echo ' even';
        }
        ?>
">
                                <td id='cs_<?php 
        echo $grade_spec->getId();
        ?>
_expand' style="vertical-align: middle; text-align: center;">
开发者ID:taryono,项目名称:school,代码行数:31,代码来源:listSuccess.php

示例14: executePrintExam

 public function executePrintExam()
 {
     $counseling_id = $this->getRequestParameter('counseling_id');
     $counseling = CounselingPeer::retrieveByPK($counseling_id);
     $this->forward404Unless($counseling);
     $academic_calendar = AcademicCalendarPeer::retrieveByPK($this->getRequestParameter('accal_id'));
     $this->forward404Unless($academic_calendar);
     $time = $this->getRequestParameter('time');
     $time2 = $this->getRequestParameter('time2');
     $tgl = $this->getRequestParameter('tgl_cetak');
     $test1 = $this->getRequestParameter('test1');
     $test2 = $this->getRequestParameter('test2');
     $task1 = $this->getRequestParameter('task1');
     $task2 = $this->getRequestParameter('task2');
     $note = $this->getRequestParameter('note');
     $c = new Criteria();
     $c->add(TempTablePeer::COUNSELING_ID, $counseling->getId());
     $c->add(TempTablePeer::TIME, $time);
     $c->addJoin(VStudentActivePeer::ID, TempTablePeer::STUDENT_ID);
     $c->addAscendingOrderByColumn(VStudentActivePeer::CLASS_NAME);
     $students = VStudentActivePeer::doSelect($c);
     $this->forward404Unless($students);
     ## Menentukan Aturan Penilaian (Tengah Semester)
     $cd = new Criteria();
     $cd->add(ScoreRulePeer::ACADEMIC_CALENDAR_ID, $counseling->getAcademicCalendarId());
     $cd->add(ClassGroupPeer::DEPARTMENT_ID, $counseling->getAcademicCalendar()->getDepartmentId());
     $cd->addJoin(ScoreRulePeer::CLASS_GROUP_ID, ClassGroupPeer::ID);
     $cd->add(ScoreRulePeer::TYPE, ScoreRule::TYPE_ONE);
     $score_rule = ScoreRulePeer::doSelectOne($cd);
     $this->score_rule = $score_rule;
     ## Daftar Mata Pelajaran di Jadwal Pelajaran
     $cw = new Criteria();
     $cw->add(VCoursePeer::CLASS_GROUP_ID, $counseling->getClassGroupId());
     $cw->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
     $subjects = VCoursePeer::doSelect($cw);
     $subject_ids = array();
     foreach ($subjects as $subject) {
         $subject_ids[] = $subject->getSubjectCurrId();
     }
     $this->subjects = $subjects;
     ## Menentukan Aturan Penilaian Yang digunakan
     $cm = new Criteria();
     $cm->add(ScoreRuleSubjectPeer::SCORE_RULE_ID, $score_rule->getId(), Criteria::IN);
     $cm->add(ScoreRuleSubjectPeer::PUBLISHED, ScoreRule::ONE, Criteria::IN);
     $cm->add(ScoreRuleSubjectPeer::SUBJECT_CURR_ID, $subject_ids, Criteria::IN);
     $cm->add(ScoreRuleSubjectPeer::PUBLISHED, ScoreRule::ONE, Criteria::IN);
     $cm->addAscendingOrderByColumn(ScoreRuleSubjectPeer::SEQUENCE);
     $list_subs = ScoreRuleSubjectPeer::doSelect($cm);
     $subject_count = ScoreRuleSubjectPeer::doCount($cm);
     $this->list_subs = $list_subs;
     $this->subject_count = $subject_count;
     $grades_ids = array();
     $t1 = $test1 - 1;
     $t2 = $test2 - 1;
     while ($t1 <= $t2) {
         $t1++;
         $grades_ids[] = $t1;
     }
     $cmen = new Criteria();
     $cmen->add(GradeAliasPeer::ID, $grades_ids, Criteria::IN);
     $cmen->addJoin(GradeSpecPeer::ID, GradeAliasPeer::GRADE_SPEC_ID);
     $cmen->addAscendingOrderByColumn(GradeSpecPeer::ID);
     $this->grade_pdf1 = GradeSpecPeer::doSelect($cmen);
     $this->count_pdf1 = GradeSpecPeer::doCount($cmen);
     $ids = array();
     $tsk1 = $task1 - 1;
     $tsk2 = $task2 - 1;
     while ($tsk1 <= $tsk2) {
         $tsk1++;
         $ids[] = $tsk1;
     }
     $cmet = new Criteria();
     $cmet->add(GradeAliasPeer::ID, $ids, Criteria::IN);
     $cmet->addJoin(GradeSpecPeer::ID, GradeAliasPeer::GRADE_SPEC_ID);
     $cmet->addAscendingOrderByColumn(GradeSpecPeer::ID);
     $this->grade_pdf2 = GradeSpecPeer::doSelect($cmet);
     $this->count_pdf2 = GradeSpecPeer::doCount($cmet);
     $ce = new Criteria();
     $ce->add(DepartmentDetailPeer::DEPARTMENT_ID, $counseling->getAcademicCalendar()->getDepartmentId());
     $this->department_detail = DepartmentDetailPeer::doSelectOne($ce);
     $cr = new Criteria();
     $cr->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
     $cr->add(StudentRaportPeer::CLASS_GROUP_ID, $counseling->getClassGroupId());
     $student_raports = StudentRaportPeer::doSelect($cr);
     $subject_grade_spec = array();
     foreach ($student_raports as $student_raport) {
         $subject_grade_spec[$student_raport->getSubjectCurrId() . '#' . $student_raport->getGradeSpecId() . '#' . $student_raport->getStudentId()] = $student_raport;
     }
     $this->subject_grade_spec = $subject_grade_spec;
     $cw = new Criteria();
     $cw->add(CourseRegulationPeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
     $cw->add(CourseRegulationPeer::CLASS_GROUP_ID, $counseling->getClassGroupId());
     $c_regulations = CourseRegulationPeer::doSelect($cw);
     $course_reg = array();
     foreach ($c_regulations as $cr) {
         $course_reg[$cr->getAcademicCalendarId() . '#' . $cr->getSubjectCurrId() . '#' . $cr->getClassGroupId()] = $cr->getKkm();
     }
     $this->course_reg = $course_reg;
     $cb = new Criteria();
     $cb->add(StudentAbsencePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
//.........这里部分代码省略.........
开发者ID:taryono,项目名称:school,代码行数:101,代码来源:actions.class.php

示例15: executeUploadStudent

 public function executeUploadStudent()
 {
     include sfConfig::get('sf_lib_dir') . '/helper/readerHelper.php';
     $cr = new Criteria();
     $cr->add(GradeSpecPeer::PARENT, 1);
     $cr->addAscendingOrderByColumn(GradeSpecPeer::ID);
     $this->grade = GradeSpecPeer::doSelect($cr);
     $this->count = GradeSpecPeer::doCount($cr);
     if (!empty($_FILES['score_file']['tmp_name'])) {
         $file = $_FILES['score_file']['tmp_name'];
         $data = new Spreadsheet_Excel_Reader($file);
         $baris = $data->rowcount($sheet_index = 0);
         $this->baris = $baris;
         $this->data = $data;
         $fileName = $this->getRequest()->getFileName('score_file');
         if ($fileName != null && $fileName != '') {
             if (!is_readable($_FILES['score_file']['tmp_name'])) {
                 $this->error = true;
                 $this->error_msg = 'File Tidak Terbaca';
             } else {
                 if (substr($fileName, -3) == 'xls') {
                     $this->error = false;
                     $this->uploaded = true;
                 } else {
                     $this->error = true;
                     $this->error_msg = 'Format Yang Anda Upload Salah';
                 }
             }
         }
     }
     $this->actions = array(array('name' => 'save', 'type' => 'submit', 'options' => array('class' => 'save_button', 'onclick' => "action_type.value=this.value")));
     $this->subtitle = '';
 }
开发者ID:taryono,项目名称:school,代码行数:33,代码来源:actions.class.php


注:本文中的GradeSpecPeer::doCount方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。