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


PHP StudentRaportPeer::doCount方法代码示例

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


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

示例1: 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());
$cr->add(StudentRaportPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
开发者ID:taryono,项目名称:school,代码行数:31,代码来源:getListMiddleSuccess.php

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

示例3: executeDelete

 public function executeDelete()
 {
     $subject_curr_id = $this->getRequestParameter('subject_curr_id');
     $subject_curr = SubjectCurrPeer::retrieveByPK($subject_curr_id);
     $this->forward404Unless($subject_curr);
     $this->subject_curr = $subject_curr;
     $subject_grading = SubjectGradingPeer::retrieveByPk($this->getRequestParameter('id'));
     $this->forward404Unless($subject_grading);
     $ref_error = 0;
     foreach ($subject_grading->getRefCountMethods() as $ref) {
         $method = "count" . $ref['affix'];
         $count = $subject_grading->{$method}();
         if ($count > 0) {
             ++$ref_error;
             $this->getRequest()->setError('subject_grading/delete/' . sfInflector::camelize($ref['table']), $count);
         }
     }
     $c = new Criteria();
     $c->add(StudentCoursePeer::SUBJECT_CURR_ID, $subject_grading->getSubjectCurrId());
     $c->add(StudentCoursePeer::GRADE_COMPONENT_ID, $subject_grading->getGradeComponentId());
     $c->addJoin(StudentRaportPeer::STUDENT_COURSE_ID, StudentCoursePeer::ID);
     $score_count = StudentRaportPeer::doCount($c);
     if ($ref_error > 0) {
         $this->getRequest()->setError('subject_grading/delete', '_ERR_DELETE_ (' . $subject_grading->toString() . ' - id:' . $subject_grading->getId() . ')');
     } elseif ($score_count > 0) {
         $this->getRequest()->setError('subject_grading/delete/StudentScore', $score_count);
         $this->getRequest()->setError('subject_grading/delete', '_ERR_DELETE_ (' . $subject_grading->toString() . ' - id:' . $subject_grading->getId() . ')');
     } else {
         $subject_grading->delete();
     }
     $this->getRequest()->setParameter('subject_curr_id', $subject_curr_id);
     return $this->forward('subject_grading', 'list');
 }
开发者ID:taryono,项目名称:school,代码行数:33,代码来源:actions.class.php

示例4: foreach

        foreach ($avg_sr1 as $c1) {
            $total_sr1 += $c1->getGrade();
        }
        $avg1 = round($total_sr1 / $count1);
        $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);
        ?>
                     
                     <td align="center" style="text-align:center;" class="first">
				 		<?php 
        echo input_tag('Avg1', $total_sr1 != null ? $avg1 : '', array('size' => 2, 'maxlength' => 5, 'style' => 'font-size: 10px;', 'disabled' => true));
        ?>
                 	 </td>
                 
                	 <?php 
        foreach ($grade2 as $g2) {
开发者ID:taryono,项目名称:school,代码行数:31,代码来源:listByEmployeeSuccess.php

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

示例6: executePrintTestAsCSV

 public function executePrintTestAsCSV()
 {
     $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::ID);
     $this->grade = GradeSpecPeer::doSelect($cr);
     $this->count = 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);
     $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;
     ## Mengelompokkan Penilaian Ulangan Harian berdasarkan Tahun Ajaran dan Kelas
     $crn = new Criteria();
     $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();
     $uts_grade = array();
     foreach ($stuuts as $stuut) {
         $uts_grade[$stuut->getStudentId() . '#' . $stuut->getGradeSpecId()] = $stuut->getGrade();
         $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_grade = $uts_grade;
     $this->uts_avg = $uts_avg;
     $this->uts_total = $uts_total;
     $this->setLayout(false);
     $this->getResponse()->setHttpHeader('Content-Type', 'application/vnd-ms-excel');
     $this->getResponse()->setHttpHeader('Content-Disposition', 'attachment; filename="Ulangan_' . $course_schedule->getSubjectCurr()->getSubject()->getName() . '_' . $course_schedule->getClassGroup()->getName() . '_' . $course_schedule->getAcademicCalendar()->getName() . '.xls"');
 }
开发者ID:taryono,项目名称:school,代码行数:57,代码来源:actions.class.php

示例7: countStudentRaports

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


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