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


PHP StudentRaportPeer::doSelect方法代码示例

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


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

示例1: executeGetList

 public function executeGetList()
 {
     $course_id = $this->getRequestParameter('course_id');
     $course_schedule = CourseSchedulePeer::retrieveByPK($course_id);
     $this->forward404Unless($course_schedule);
     $this->course_schedule = $course_schedule;
     $grade_spec_id = $this->getRequestParameter('grade_spec_id');
     $grade_spec = GradeSpecPeer::retrieveByPK($grade_spec_id);
     $this->forward404Unless($grade_spec);
     $this->grade_spec = $grade_spec;
     if ($grade_spec_id) {
         $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);
     } else {
         $c = new Criteria();
         $c->add(VStudentPeer::ACADEMIC_CALENDAR_ID, -1);
     }
     $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;
     ## Mengelompokkan Penilaian Anak berdasarkan Tahun Ajaran dan Kelas
     $cr = new Criteria();
     $cr->add(StudentRaportPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
     $cr->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
     $cr->add(StudentRaportPeer::SUBJECT_CURR_ID, $course_schedule->getSubjectCurrId());
     $stugrades = StudentRaportPeer::doSelect($cr);
     $this->stugrades = $stugrades;
     $grades = array();
     $grade_avg = array();
     foreach ($stugrades as $stugrade) {
         $grades[$stugrade->getStudentId() . '#' . $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;
     $cw = new Criteria();
     $cw->add(CourseRegulationPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
     $cw->add(CourseRegulationPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
     $cw->add(CourseRegulationPeer::SUBJECT_CURR_ID, $course_schedule->getSubjectCurrId());
     $course_reg = CourseRegulationPeer::doSelectOne($cw);
     $this->course_reg = $course_reg;
     $this->subtitle = $grade_spec->toString() . ' - ' . $grade_spec->getParentName();
     $actions3 = array(array('name' => 'save', 'type' => 'submit', 'options' => array('class' => 'save_button', 'onclick' => "action_type.value=this.value")), array('name' => 'reset', 'type' => 'reset', 'options' => array('class' => 'save_button', 'onclick' => "\$\$('.score').each(function(el){el.style.borderColor='';el.style.borderWidth='';});")));
     $this->actions3 = $actions3;
 }
开发者ID:taryono,项目名称:school,代码行数:54,代码来源:actions.class.php

示例2: 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

示例3: array

        ?>
",<?php 
    }
    ?>
"<?php 
    $grade_ids2 = array();
    foreach ($grade2 as $g2) {
        $grade_ids2[] = $g2->getId();
    }
    $cw = new Criteria();
    $cw->add(StudentRaportPeer::STUDENT_ID, $student->getId(), Criteria::IN);
    $cw->add(StudentRaportPeer::SUBJECT_CURR_ID, $course_schedule->getSubjectCurrId(), Criteria::IN);
    $cw->add(StudentRaportPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId(), Criteria::IN);
    $cw->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId(), Criteria::IN);
    $cw->add(StudentRaportPeer::GRADE_SPEC_ID, $grade_ids2, Criteria::IN);
    $avg_sr2 = StudentRaportPeer::doSelect($cw);
    $count2 = StudentRaportPeer::doCount($cw);
    $total_sr2 = 0;
    foreach ($avg_sr2 as $c2) {
        $total_sr2 += $c2->getGrade();
    }
    $avg2 = round($total_sr2 / $count2);
    echo $total_sr2 != null ? $avg2 : '';
    ?>
","<?php 
    $cr = new Criteria();
    $cr->add(StudentRaportPeer::STUDENT_ID, $student->getId());
    $cr->add(StudentRaportPeer::SUBJECT_CURR_ID, $course_schedule->getSubjectCurrId());
    $cr->add(StudentRaportPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
    $cr->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
    $cr->add(StudentRaportPeer::GRADE_SPEC_ID, 14);
开发者ID:taryono,项目名称:school,代码行数:31,代码来源:listAsCSVSuccess.php

示例4: 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

示例5: executeGetScore

 public function executeGetScore()
 {
     $academic_calendar_id = $this->getRequestParameter('academic_calendar_id');
     $academic_calendar = AcademicCalendarPeer::retrieveByPK($academic_calendar_id);
     $this->forward404Unless($academic_calendar);
     $counseling_id = $this->getRequestParameter('counseling_id');
     $counseling = CounselingPeer::retrieveByPK($counseling_id);
     $this->forward404Unless($counseling);
     $student_id = $this->getRequestParameter('student_id');
     $student = StudentPeer::retrieveByPK($student_id);
     $this->forward404Unless($student);
     ## 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;
     ## 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());
     $stugrades = StudentRaportPeer::doSelect($cr);
     $this->stugrades = $stugrades;
     ## Menentukan Aturan Penilaian
     $cd = new Criteria();
     $cd->add(ClassGroupPeer::DEPARTMENT_ID, $counseling->getAcademicCalendar()->getDepartmentId());
     $cd->addJoin(ScoreRulePeer::CLASS_GROUP_ID, ClassGroupPeer::ID);
     $cd->add(ScoreRulePeer::TYPE, 6);
     $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;
     ## Kelompokkan Mata Pelajaran Muatan Nasional
     $cmi = new Criteria();
     $cmi->add(ScoreRuleSubjectPeer::SCORE_RULE_ID, $score_rule->getId(), Criteria::IN);
     $cmi->add(ScoreRuleSubjectPeer::PUBLISHED, 1, Criteria::IN);
     $cmi->add(ScoreRuleSubjectPeer::SUBJECT_TYPE, 1, Criteria::IN);
     $cmi->add(ScoreRuleSubjectPeer::SUBJECT_CURR_ID, $subject_ids, Criteria::IN);
     $cmi->addAscendingOrderByColumn(ScoreRuleSubjectPeer::SEQUENCE);
     $subs1 = ScoreRuleSubjectPeer::doSelect($cmi);
     $subs1_count = ScoreRuleSubjectPeer::doCount($cmi);
     $this->subs1 = $subs1;
     $this->subs1_count = $subs1_count;
     ## Kelompokkan Mata Pelajaran Muatan Lokal
     $ciw = new Criteria();
     $ciw->add(ScoreRuleSubjectPeer::SCORE_RULE_ID, $score_rule->getId(), Criteria::IN);
     $ciw->add(ScoreRuleSubjectPeer::PUBLISHED, 1, Criteria::IN);
     $ciw->add(ScoreRuleSubjectPeer::SUBJECT_TYPE, 2, Criteria::IN);
     $ciw->add(ScoreRuleSubjectPeer::SUBJECT_CURR_ID, $subject_ids, Criteria::IN);
     $ciw->addAscendingOrderByColumn(ScoreRuleSubjectPeer::SEQUENCE);
     $subs2 = ScoreRuleSubjectPeer::doSelect($ciw);
     $subs2_count = ScoreRuleSubjectPeer::doCount($ciw);
     $this->subs2 = $subs2;
     $this->subs2_count = $subs2_count;
     ## Kelompokkan Mata Pelajaran IPA
     $ci = new Criteria();
     $ci->add(ScoreRuleSubjectPeer::SCORE_RULE_ID, $score_rule->getId(), Criteria::IN);
     $ci->add(ScoreRuleSubjectPeer::PUBLISHED, 1, Criteria::IN);
     $ci->add(ScoreRuleSubjectPeer::SUBJECT_TYPE, 3, Criteria::IN);
     $ci->add(ScoreRuleSubjectPeer::SUBJECT_CURR_ID, $subject_ids, Criteria::IN);
     $ci->addAscendingOrderByColumn(ScoreRuleSubjectPeer::SEQUENCE);
     $ipas = ScoreRuleSubjectPeer::doSelect($ci);
     $ipas_count = ScoreRuleSubjectPeer::doCount($ci);
     $this->ipas = $ipas;
     $this->ipas_count = $ipas_count;
     ## Kelompokkan Mata Pelajaran IPS
     $cit = new Criteria();
     $cit->add(ScoreRuleSubjectPeer::SCORE_RULE_ID, $score_rule->getId(), Criteria::IN);
     $cit->add(ScoreRuleSubjectPeer::PUBLISHED, 1, Criteria::IN);
     $cit->add(ScoreRuleSubjectPeer::SUBJECT_TYPE, 4, Criteria::IN);
     $cit->add(ScoreRuleSubjectPeer::SUBJECT_CURR_ID, $subject_ids, Criteria::IN);
     $cit->addAscendingOrderByColumn(ScoreRuleSubjectPeer::SEQUENCE);
     $ips = ScoreRuleSubjectPeer::doSelect($cit);
     $ips_count = ScoreRuleSubjectPeer::doCount($cit);
     $this->ips = $ips;
     $this->ips_count = $ips_count;
     ## Kelompokkan Mata Pelajaran Setelah IPS
     $cet = new Criteria();
     $cet->add(ScoreRuleSubjectPeer::SCORE_RULE_ID, $score_rule->getId(), Criteria::IN);
     $cet->add(ScoreRuleSubjectPeer::PUBLISHED, 1, Criteria::IN);
     $cet->add(ScoreRuleSubjectPeer::SUBJECT_TYPE, 5, Criteria::IN);
     $cet->add(ScoreRuleSubjectPeer::SUBJECT_CURR_ID, $subject_ids, Criteria::IN);
     $cet->addAscendingOrderByColumn(ScoreRuleSubjectPeer::SEQUENCE);
     $subs3 = ScoreRuleSubjectPeer::doSelect($cet);
     $subs3_count = ScoreRuleSubjectPeer::doCount($cet);
     $this->subs3 = $subs3;
     $this->subs3_count = $subs3_count;
     ## Kelompokkan Mata Pelajaran Pilihan
//.........这里部分代码省略.........
开发者ID:taryono,项目名称:school,代码行数:101,代码来源:actions.class.php

示例6: use_helper

<?php

use_helper('Number', 'myHelper');
foreach ($students as $student) {
    $student_detail = $student->getStudentDetail();
    $student_accal_id = $stuaccal_id[$student->getId()];
    ## Penentuan Ekskul
    $cd = new Criteria();
    $cd->add(GradeComponentPeer::GRADE_SPEC_ID, 21);
    $cd->add(GradeComponentPeer::PUBLISHED, 1);
    $cd->addJoin(StudentRaportPeer::GRADE_COMPONENT_ID, GradeComponentPeer::ID);
    $cd->add(StudentRaportPeer::STUDENT_ID, $student->getId());
    $cd->add(StudentRaportPeer::CLASS_GROUP_ID, $counseling->getClassGroupId());
    $cd->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
    $ekskuls = StudentRaportPeer::doSelect($cd);
    $count_ekskul = StudentRaportPeer::doCount($cd);
    echo include_partial('global/printCoverRaport');
    ?>
		<style>
			table.list_description td, table.list_description th {
				padding-top: 5px;
				padding-bottom: 5px;
			}
		</style>
        <!-- Halaman 1 -->
        <table width="100%" border="0" style="page-break-after: always;">
            <?php 
    if ($academic_calendar->getDepartmentId() == 7) {
        ?>
                <tr>
                    <td width="100%" align="left">
开发者ID:taryono,项目名称:school,代码行数:31,代码来源:printFinalSuccess.php

示例7: foreach

<?php

foreach ($students as $student) {
    ?>

<?php 
    use_helper('Number', 'myHelper');
    $cr = new Criteria();
    $cr->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
    $cr->add(StudentRaportPeer::STUDENT_ID, $student->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;
    }
    $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();
    }
    $cb = new Criteria();
    $cb->add(StudentAbsencePeer::STUDENT_ID, $student->getId());
    $cb->add(StudentAbsencePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
    $cb->addGroupByColumn(StudentAbsencePeer::STUDENT_ID);
    $cb->addGroupByColumn(StudentAbsencePeer::START);
    $cb->addGroupByColumn(StudentAbsencePeer::ACADEMIC_CALENDAR_ID);
    $cb->addGroupByColumn(StudentAbsencePeer::CLASS_GROUP_ID);
开发者ID:taryono,项目名称:school,代码行数:31,代码来源:printExamSuccess_.php

示例8: __

    echo $i + ($pager->getPage() - 1) * $pager->getMaxPerPage();
    ?>
</td>
                        <td style="text-align:left; vertical-align: middle; font-size: 10px;"><b><?php 
    echo __('Class group');
    ?>
&nbsp;<?php 
    echo $class_group->getName() ? $class_group->getName() : '-';
    ?>
</b></td>
                                <?php 
    $ct = new Criteria();
    $ct->add(StudentRaportPeer::CLASS_GROUP_ID, $class_group->getId());
    $ct->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
    $ct->add(StudentRaportPeer::GRADE_SPEC_ID, 16);
    $grades = StudentRaportPeer::doSelect($ct);
    $grade_avg = array();
    foreach ($grades as $grade) {
        $grade_avg[$grade->getSubjectCurrId()] = (array_key_exists($grade->getsubjectCurrId(), $grade_avg) ? $grade_avg[$grade->getSubjectCurrId()] : 0) + $grade->getGrade();
    }
    $cm = new Criteria();
    $cm->add(StudentAccalPeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
    $cm->add(StudentAccalPeer::CLASS_GROUP_ID, $class_group->getId());
    $cm->addJoin(StudentPeer::ID, StudentAccalPeer::STUDENT_ID);
    $cm->add(StudentPeer::STATUS, 2, Criteria::NOT_EQUAL);
    $cm->add(StudentPeer::STATUS, 3, Criteria::NOT_EQUAL);
    $student_count = StudentPeer::doCount($cm);
    if ($subject_count > 1) {
        $subject_total = 0;
        $j = 0;
        $k = 0;
开发者ID:taryono,项目名称:school,代码行数:31,代码来源:listRaportAsCSVSuccess.php

示例9: use_helper

<?php

use_helper('Object', 'Validation', 'myHelper');
echo include_partial('global/tab', array('actions2' => $actions2));
echo include_partial('global/title4', array('type' => 'list', 'title' => __('Rekap Nilai UAS'), 'actions' => $actions, 'subtitle' => $subtitle . ($sf_request->hasErrors() ? '<div class=form_error>* ' . __('_FORM_HAS_ERROR_') . '</div>' : '')));
echo form_remote_tag(array('url' => 'counseling_menu/listUas?accal_id=' . $academic_calendar->getId() . '&counseling_id=' . $counseling->getId(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), 'name=edit_form');
echo input_hidden_tag('sort');
$cr = new Criteria();
$cr->add(StudentRaportPeer::CLASS_GROUP_ID, $counseling->getClassGroupId());
$cr->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
$stugrades = StudentRaportPeer::doSelect($cr);
$grades = array();
$grade_avg = array();
foreach ($stugrades as $stugrade) {
    $grades[$stugrade->getSubjectCurrId() . '#' . $stugrade->getStudentId() . '#' . $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();
}
$column = $subject_count7 + $subject_count8;
$column_smp = $subject_count1 + $subject_count2 + $ipa_count + $ips_count;
?>

<table border="0" width="100%" style="margin-top: -10px;">
	<tr>
	<td valign="top">
		<table class="list">
		<tr>    
    			<td class="list" valign="top">
			<table class="list_content" width="100%">
				<thead>
				<!-- Tingkat SD -->	
				<?php 
开发者ID:taryono,项目名称:school,代码行数:31,代码来源:listUasSuccess.php

示例10: executeDelete

 public function executeDelete()
 {
     $schedule = SchedulePeer::retrieveByPk($this->getRequestParameter('id'));
     $this->forward404Unless($schedule);
     #$ref_error = 0;
     #foreach ($schedule->getRefCountMethods() as $ref) {
     #	$method = "count".$ref['affix'];
     #	$count = $schedule->$method();
     #	if ($count > 0) {
     #		++$ref_error;
     #		$this->getRequest()->setError('extracurricular/delete/'.sfInflector::camelize($ref['table']), $count);
     #	}
     #}
     #if ($ref_error > 0) {
     #	$this->getRequest()->setError('extracurricular/delete', '_ERR_DELETE_ ('.$schedule->toString().' - id:'.$schedule->getId().')');
     #} else {
     $c = new Criteria();
     $c->add(ScheduleDetailPeer::SCHEDULE_ID, $this->getRequestParameter('id'));
     $sc_details = ScheduleDetailPeer::doSelect($c);
     foreach ($sc_details as $sc_detail) {
         $sc_detail->delete();
     }
     $cb = new Criteria();
     $cb->add(ScheduleTutorPeer::SCHEDULE_ID, $this->getRequestParameter('id'));
     $sc_tutors = ScheduleTutorPeer::doSelect($cb);
     foreach ($sc_tutors as $sc_tutor) {
         $sc_tutor->delete();
     }
     $cw = new Criteria();
     $cw->add(StudentRaportPeer::SCHEDULE_ID, $this->getRequestParameter('id'));
     $sc_raports = StudentRaportPeer::doSelect($cw);
     foreach ($sc_raports as $sc_raport) {
         $sc_raport->delete();
     }
     $schedule->delete();
     #}
     return $this->forward('extracurricular', 'list');
 }
开发者ID:taryono,项目名称:school,代码行数:38,代码来源:actions.class.php

示例11: array

}
?>
                
                <td align="center" style="text-align:center; vertical-align:middle;" width="4%">
				<?php 
$grade2_ids = array();
foreach ($grade2 as $g2) {
    $grade2_ids[] = $g2->getId();
}
$cw = new Criteria();
$cw->add(StudentRaportPeer::STUDENT_ID, $student->getId(), Criteria::IN);
$cw->add(StudentRaportPeer::SUBJECT_CURR_ID, $course_schedule->getSubjectCurrId(), Criteria::IN);
$cw->add(StudentRaportPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId(), Criteria::IN);
$cw->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId(), Criteria::IN);
$cw->add(StudentRaportPeer::GRADE_SPEC_ID, $grade2_ids, Criteria::IN);
$raports = StudentRaportPeer::doSelect($cw);
$count_raport = StudentRaportPeer::doCount($cw);
$total_score = 0;
foreach ($raports as $c) {
    $total_score += $c->getGrade();
}
?>
                <?php 
echo $total_score ? round($total_score / $count_raport) : ' ';
?>
				</td>
                
                <?php 
$cr = new Criteria();
$cr->add(StudentRaportPeer::STUDENT_ID, $student->getId());
$cr->add(StudentRaportPeer::SUBJECT_CURR_ID, $course_schedule->getSubjectCurrId());
开发者ID:taryono,项目名称:school,代码行数:31,代码来源:getListMiddleSuccess.php

示例12: retrieveByPKs

 public static function retrieveByPKs($pks, $con = null)
 {
     if ($con === null) {
         $con = Propel::getConnection(self::DATABASE_NAME);
     }
     $objs = null;
     if (empty($pks)) {
         $objs = array();
     } else {
         $criteria = new Criteria();
         $criteria->add(StudentRaportPeer::ID, $pks, Criteria::IN);
         $objs = StudentRaportPeer::doSelect($criteria, $con);
     }
     return $objs;
 }
开发者ID:taryono,项目名称:school,代码行数:15,代码来源:BaseStudentRaportPeer.php

示例13: executePrintFinal

 public function executePrintFinal()
 {
     $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');
     $term = $this->getRequestParameter('term');
     $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);
     ## Mengelompokkan Penilaian Anak berdasarkan Tahun Ajaran dan Kelas
     $cri = new Criteria();
     $cri->add(StudentNotePeer::CLASS_GROUP_ID, $counseling->getClassGroupId());
     $cri->add(StudentNotePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
     $stunotes = StudentNotePeer::doSelect($cri);
     $notes = array();
     foreach ($stunotes as $stunote) {
         $notes[$stunote->getStudentId() . '#' . $stunote->getRanking()] = $stunote->getNote();
     }
     $this->notes = $notes;
     $this->stunotes = $stunotes;
     ## 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;
     ## 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());
     $stugrades = StudentRaportPeer::doSelect($cr);
     $this->stugrades = $stugrades;
     ## 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, 6);
     $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;
     ## Kelompokkan Mata Pelajaran Muatan Nasional
     $cmi = new Criteria();
     $cmi->add(ScoreRuleSubjectPeer::SCORE_RULE_ID, $score_rule->getId(), Criteria::IN);
     $cmi->add(ScoreRuleSubjectPeer::PUBLISHED, 1, Criteria::IN);
     $cmi->add(ScoreRuleSubjectPeer::SUBJECT_TYPE, 1, Criteria::IN);
     $cmi->add(ScoreRuleSubjectPeer::SUBJECT_CURR_ID, $subject_ids, Criteria::IN);
     $cmi->addAscendingOrderByColumn(ScoreRuleSubjectPeer::SEQUENCE);
     $subs1 = ScoreRuleSubjectPeer::doSelect($cmi);
     $subs1_count = ScoreRuleSubjectPeer::doCount($cmi);
     $this->subs1 = $subs1;
     $this->subs1_count = $subs1_count;
     ## Kelompokkan Mata Pelajaran Muatan Lokal
     $ciw = new Criteria();
     $ciw->add(ScoreRuleSubjectPeer::SCORE_RULE_ID, $score_rule->getId(), Criteria::IN);
     $ciw->add(ScoreRuleSubjectPeer::PUBLISHED, 1, Criteria::IN);
     $ciw->add(ScoreRuleSubjectPeer::SUBJECT_TYPE, 2, Criteria::IN);
     $ciw->add(ScoreRuleSubjectPeer::SUBJECT_CURR_ID, $subject_ids, Criteria::IN);
     $ciw->addAscendingOrderByColumn(ScoreRuleSubjectPeer::SEQUENCE);
     $subs2 = ScoreRuleSubjectPeer::doSelect($ciw);
     $subs2_count = ScoreRuleSubjectPeer::doCount($ciw);
     $this->subs2 = $subs2;
     $this->subs2_count = $subs2_count;
     ## Kelompokkan Mata Pelajaran IPA
     $ci = new Criteria();
     $ci->add(ScoreRuleSubjectPeer::SCORE_RULE_ID, $score_rule->getId(), Criteria::IN);
     $ci->add(ScoreRuleSubjectPeer::PUBLISHED, 1, Criteria::IN);
     $ci->add(ScoreRuleSubjectPeer::SUBJECT_TYPE, 3, Criteria::IN);
     $ci->add(ScoreRuleSubjectPeer::SUBJECT_CURR_ID, $subject_ids, Criteria::IN);
     $ci->addAscendingOrderByColumn(ScoreRuleSubjectPeer::SEQUENCE);
     $ipas = ScoreRuleSubjectPeer::doSelect($ci);
     $ipas_count = ScoreRuleSubjectPeer::doCount($ci);
     $this->ipas = $ipas;
     $this->ipas_count = $ipas_count;
     ## Kelompokkan Mata Pelajaran IPS
     $cit = new Criteria();
     $cit->add(ScoreRuleSubjectPeer::SCORE_RULE_ID, $score_rule->getId(), Criteria::IN);
     $cit->add(ScoreRuleSubjectPeer::PUBLISHED, 1, Criteria::IN);
//.........这里部分代码省略.........
开发者ID:taryono,项目名称:school,代码行数:101,代码来源:actions.class.php

示例14: executeListAllScore

 public function executeListAllScore()
 {
     $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();
     $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;
     $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;
     ## Mengelompokkan Penilaian Keterampilan dan Sikap 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();
     $grades_value = array();
     $remarks = array();
     $grade_avg = array();
     foreach ($stugrades as $stugrade) {
         $grades[$stugrade->getStudentAccalId() . '#' . $stugrade->getGradeSpecId()] = $stugrade->getGrade();
         $grades_value[$stugrade->getStudentAccalId() . '#' . $stugrade->getGradeSpecId()] = $stugrade->getGradeValue();
         $remarks[$stugrade->getStudentAccalId() . '#' . $stugrade->getGradeSpecId()] = $stugrade->getRemark();
         $grade_avg[$stugrade->getGradeSpecId()] = (array_key_exists($stugrade->getGradeSpecId(), $grade_avg) ? $grade_avg[$stugrade->getGradeSpecId()] : 0) + $stugrade->getGradeValue();
     }
     $this->grades = $grades;
     $this->grade_avg = $grade_avg;
     $this->grades_value = $grades_value;
     $this->remarks = $remarks;
     ## Mengelompokkan Penilaian Raport
     $cri = new Criteria();
     $cri->add(StudentRaportPeer::SUBJECT_CURR_ID, $course_schedule->getSubjectCurrId());
     $cri->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
     $cri->add(StudentRaportPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
     $sturaports = StudentRaportPeer::doSelect($cri);
     $this->sturaports = $sturaports;
     $raports = array();
     $raport_avg = array();
     foreach ($sturaports as $sturaport) {
         $raports[$sturaport->getStudentId() . '#' . $sturaport->getGradeSpecId()] = $sturaport->getGrade();
         $raport_avg[$sturaport->getGradeSpecId()] = (array_key_exists($sturaport->getGradeSpecId(), $raport_avg) ? $raport_avg[$sturaport->getGradeSpecId()] : 0) + $sturaport->getGrade();
         #$raport_total[$sturaport->getGradeSpecId()] = (array_key_exists($sturaport->getGradeSpecId(), $raport_total) ? $raport_total[$sturaport->getGradeSpecId()] : 0) + 1;
     }
     $this->raports = $raports;
     $this->raport_avg = $raport_avg;
     #$this->raport_total = $raport_total;
     ## Mengelompokkan Penilaian Ulangan Harian berdasarkan Tahun Ajaran dan Kelas
     $crn = new Criteria();
     $crn->add(GradeSpecPeer::PARENT, 1);
     $crn->addJoin(StudentRaportPeer::GRADE_SPEC_ID, GradeSpecPeer::ID);
     $crn->add(StudentRaportPeer::SUBJECT_CURR_ID, $course_schedule->getSubjectCurrId());
     $crn->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
     $crn->add(StudentRaportPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
     $stuuts = StudentRaportPeer::doSelect($crn);
     $utscount = StudentRaportPeer::doCount($crn);
     $this->stuuts = $stuuts;
     $this->utscount = $utscount;
     $uts_avg = array();
     $uts_total = array();
     foreach ($stuuts as $stuut) {
         $uts_avg[$stuut->getStudentId()] = (array_key_exists($stuut->getStudentId(), $uts_avg) ? $uts_avg[$stuut->getStudentId()] : 0) + $stuut->getGrade();
         $uts_total[$stuut->getStudentId()] = (array_key_exists($stuut->getStudentId(), $uts_total) ? $uts_total[$stuut->getStudentId()] : 0) + 1;
     }
     $this->uts_avg = $uts_avg;
     $this->uts_total = $uts_total;
     ## Mengelompokkan Penilaian Tugas berdasarkan Tahun Ajaran dan Kelas
     $crm = new Criteria();
     $crm->add(GradeSpecPeer::PARENT, 7);
     $crm->addJoin(StudentRaportPeer::GRADE_SPEC_ID, GradeSpecPeer::ID);
     $crm->add(StudentRaportPeer::SUBJECT_CURR_ID, $course_schedule->getSubjectCurrId());
     $crm->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
     $crm->add(StudentRaportPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
     $stuuas = StudentRaportPeer::doSelect($crm);
     $uascount = StudentRaportPeer::doCount($crm);
     $this->stuuas = $stuuas;
//.........这里部分代码省略.........
开发者ID:taryono,项目名称:school,代码行数:101,代码来源:actions.class.php

示例15: 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;
     ## Menentukan Aturan Penilaian
     $cd = new Criteria();
     $cd->add(ClassGroupPeer::DEPARTMENT_ID, $academic_calendar->getDepartmentId());
     $cd->addJoin(ScoreRulePeer::CLASS_GROUP_ID, ClassGroupPeer::ID);
     $cd->add(ScoreRulePeer::TYPE, 6);
     $score_rule = ScoreRulePeer::doSelectOne($cd);
     $this->score_rule = $score_rule;
     $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;
     $ct = new Criteria();
     $ct->add(GradeSpecPeer::PARENT, 1, Criteria::IN);
     #$ct->addJoin(GradeSpecPeer::ID, ScoreRuleObjectPeer::GRADE_SPEC_ID);
     #$ct->add(ScoreRuleObjectPeer::PUBLISHED, 1, Criteria::IN);
     #$ct->add(ScoreRuleObjectPeer::SCORE_RULE_ID, $score_rule->getId(), Criteria::IN);
     #$ct->addAscendingOrderByColumn(ScoreRuleObjectPeer::SEQUENCE);
     $this->grade1 = GradeSpecPeer::doSelect($ct);
     $this->count1 = GradeSpecPeer::doCount($ct);
     $cte = new Criteria();
     $cte->add(GradeSpecPeer::PARENT, 7, Criteria::IN);
     #$cte->addJoin(GradeSpecPeer::ID, ScoreRuleObjectPeer::GRADE_SPEC_ID);
     #$cte->add(ScoreRuleObjectPeer::PUBLISHED, 1, Criteria::IN);
     #$cte->add(ScoreRuleObjectPeer::SCORE_RULE_ID, $score_rule->getId(), Criteria::IN);
     #$cte->addAscendingOrderByColumn(ScoreRuleObjectPeer::SEQUENCE);
     $this->grade2 = GradeSpecPeer::doSelect($cte);
     $this->count2 = GradeSpecPeer::doCount($cte);
     ## Daftar Mata Pelajaran di Jadwal Pelajaran
     $cty = new Criteria();
     $cty->add(VCoursePeer::CLASS_GROUP_ID, $counseling->getClassGroupId());
     $cty->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
     $subjects = VCoursePeer::doSelect($cty);
     $subject_ids = array();
     foreach ($subjects as $subject) {
         $subject_ids[] = $subject->getSubjectCurrId();
     }
     $this->subjects = $subjects;
     ## 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());
     $stugrades = StudentRaportPeer::doSelect($cr);
     $this->stugrades = $stugrades;
     ## 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;
     ## Kelompokkan Mata Pelajaran Muatan Nasional
     $cmi = new Criteria();
     $cmi->add(ScoreRuleSubjectPeer::SCORE_RULE_ID, $score_rule->getId(), Criteria::IN);
     $cmi->add(ScoreRuleSubjectPeer::PUBLISHED, 1, Criteria::IN);
     $cmi->add(ScoreRuleSubjectPeer::SUBJECT_TYPE, 1, Criteria::IN);
     $cmi->add(ScoreRuleSubjectPeer::SUBJECT_CURR_ID, $subject_ids, Criteria::IN);
     $cmi->addAscendingOrderByColumn(ScoreRuleSubjectPeer::SEQUENCE);
     $subs1 = ScoreRuleSubjectPeer::doSelect($cmi);
     $subs1_count = ScoreRuleSubjectPeer::doCount($cmi);
     $this->subs1 = $subs1;
     $this->subs1_count = $subs1_count;
     ## Kelompokkan Mata Pelajaran Muatan Lokal
     $ciw = new Criteria();
     $ciw->add(ScoreRuleSubjectPeer::SCORE_RULE_ID, $score_rule->getId(), Criteria::IN);
     $ciw->add(ScoreRuleSubjectPeer::PUBLISHED, 1, Criteria::IN);
     $ciw->add(ScoreRuleSubjectPeer::SUBJECT_TYPE, 2, Criteria::IN);
     $ciw->add(ScoreRuleSubjectPeer::SUBJECT_CURR_ID, $subject_ids, Criteria::IN);
     $ciw->addAscendingOrderByColumn(ScoreRuleSubjectPeer::SEQUENCE);
     $subs2 = ScoreRuleSubjectPeer::doSelect($ciw);
     $subs2_count = ScoreRuleSubjectPeer::doCount($ciw);
     $this->subs2 = $subs2;
     $this->subs2_count = $subs2_count;
     ## Kelompokkan Mata Pelajaran IPA
     $ci = new Criteria();
     $ci->add(ScoreRuleSubjectPeer::SCORE_RULE_ID, $score_rule->getId(), Criteria::IN);
     $ci->add(ScoreRuleSubjectPeer::PUBLISHED, 1, Criteria::IN);
     $ci->add(ScoreRuleSubjectPeer::SUBJECT_TYPE, 3, Criteria::IN);
     $ci->add(ScoreRuleSubjectPeer::SUBJECT_CURR_ID, $subject_ids, Criteria::IN);
     $ci->addAscendingOrderByColumn(ScoreRuleSubjectPeer::SEQUENCE);
     $ipas = ScoreRuleSubjectPeer::doSelect($ci);
     $ipas_count = ScoreRuleSubjectPeer::doCount($ci);
     $this->ipas = $ipas;
//.........这里部分代码省略.........
开发者ID:taryono,项目名称:school,代码行数:101,代码来源:actions.class.php


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