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


PHP StudentRaportPeer::doSelectOne方法代码示例

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


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

示例1: Criteria

        $cr = new Criteria();
        $cr->add(StudentRaportPeer::STUDENT_COURSE_ID, $student_course->getId());
        $cr->add(StudentRaportPeer::GRADE_SPEC_ID, 15);
        $sr4 = StudentRaportPeer::doSelectOne($cr);
        ?>
					<td align="center" style="text-align:center" class="first">
					<?php 
        echo $sr4 != null ? $sr4->getGrade() : '-';
        ?>
                    </td>
                
                <?php 
        $cr = new Criteria();
        $cr->add(StudentRaportPeer::STUDENT_COURSE_ID, $student_course->getId());
        $cr->add(StudentRaportPeer::GRADE_SPEC_ID, 16);
        $sr5 = StudentRaportPeer::doSelectOne($cr);
        ?>
					<td align="center" style="text-align:center" class="first">
					<?php 
        echo $sr5 != null ? $sr5->getGrade() : '-';
        ?>
                    </td>
            </tr>
			<?php 
    }
    ?>
			<?php 
}
?>
			</tbody>
		</table>
开发者ID:taryono,项目名称:school,代码行数:31,代码来源:listFromScoreSuccess.php

示例2: executeDelete

 public function executeDelete()
 {
     $student = StudentPeer::retrieveByPk($this->getRequestParameter('id'));
     $this->forward404Unless($student);
     $schedule = SchedulePeer::retrieveByPk($this->getRequestParameter('schedule_id'));
     $this->forward404Unless($schedule);
     $schedule_detail = ScheduleDetailPeer::retrieveByPk($this->getRequestParameter('detail_id'));
     $this->forward404Unless($schedule_detail);
     $c = new Criteria();
     $c->add(StudentRaportPeer::STUDENT_ID, $student->getId());
     $c->add(StudentRaportPeer::GRADE_COMPONENT_ID, $schedule->getGradeComponentId());
     $c->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $schedule->getAcademicCalendarId());
     $c->add(StudentRaportPeer::SCHEDULE_DETAIL_ID, $schedule_detail->getId());
     $c->add(StudentRaportPeer::SCHEDULE_ID, $schedule->getId());
     $student_raport = StudentRaportPeer::doSelectOne($c);
     $student_raport->delete();
     return $this->redirect('course_ekskul/list?id=' . $schedule->getId() . '&detail_id=' . $schedule_detail->getId());
 }
开发者ID:taryono,项目名称:school,代码行数:18,代码来源:actions.class.php

示例3: Criteria

                                                <td style="text-align:center; vertical-align: middle; font-size:10px; <?php 
            ++$k;
            if ($k % 2 != 0) {
                echo 'background-color: #ECF6FF;';
            }
            ?>
">
                                                    <?php 
            $cr = new Criteria();
            $cr->add(StudentRaportPeer::CLASS_GROUP_ID, $class_group->getId());
            $cr->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
            $cr->add(StudentRaportPeer::GRADE_SPEC_ID, 16);
            $cr->add(StudentRaportPeer::SUBJECT_CURR_ID, $subject->getSubjectCurrId());
            $cr->addDescendingOrderByColumn(StudentRaportPeer::GRADE);
            $cr->setLimit(1);
            $stugrade = StudentRaportPeer::doSelectOne($cr);
            echo $stugrade ? $stugrade->getGrade() : '-';
            ?>
                                                </td>
                                                
                                                <td style="text-align:center; vertical-align: middle; font-size:10px; <?php 
            ++$l;
            if ($l % 2 == 0) {
                echo 'background-color: #ECF6FF;';
            }
            ?>
">
                                                    <?php 
            echo array_key_exists($subject->getSubjectCurrId(), $grade_avg) ? round($grade_avg[$subject->getSubjectCurrId()] / $student_count) : '-';
            if (array_key_exists($subject->getSubjectCurrId(), $grade_avg)) {
                $subject_total += round($grade_avg[$subject->getSubjectCurrId()] / $student_count);
开发者ID:taryono,项目名称:school,代码行数:31,代码来源:listRaportAsCSVSuccess.php

示例4: executeSaveRanks

 public function executeSaveRanks()
 {
     $counseling = CounselingPeer::retrieveByPK($this->getRequestParameter('counseling_id'));
     $this->forward404Unless($counseling);
     $academic_calendar = AcademicCalendarPeer::retrieveByPK($this->getRequestParameter('accal_id'));
     $this->forward404Unless($academic_calendar);
     $ranks = $this->getRequestParameter('rank');
     foreach ($ranks as $student_id => $rank) {
         $c = new Criteria();
         $c->add(StudentAccalPeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
         $c->add(StudentAccalPeer::CLASS_GROUP_ID, $counseling->getClassGroupId());
         $c->add(StudentAccalPeer::STUDENT_ID, $student_id);
         $sa = StudentAccalPeer::doSelectOne($c);
         if ($sa == null) {
             $sa = new StudentAccal();
         }
         $sa->setStudentId($student_id);
         $sa->setAcademicCalendarId($academic_calendar->getId());
         $sa->setClassGroupId($counseling->getClassGroupId());
         $sa->setClassRank($rank);
         $sa->save();
     }
     $totalScores = $this->getRequestParameter('totalScore');
     foreach ($totalScores as $student_id => $totalScore) {
         $c = new Criteria();
         $c->add(StudentAccalPeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
         $c->add(StudentAccalPeer::CLASS_GROUP_ID, $counseling->getClassGroupId());
         $c->add(StudentAccalPeer::STUDENT_ID, $student_id);
         $sa = StudentAccalPeer::doSelectOne($c);
         if ($sa == null) {
             $sa = new StudentAccal();
         }
         $sa->setStudentId($student_id);
         $sa->setAcademicCalendarId($academic_calendar->getId());
         $sa->setClassGroupId($counseling->getClassGroupId());
         $sa->setTotalScore($totalScore);
         $sa->save();
     }
     $avgScores = $this->getRequestParameter('avgScore');
     foreach ($avgScores as $student_id => $avgScore) {
         $c = new Criteria();
         $c->add(StudentAccalPeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
         $c->add(StudentAccalPeer::CLASS_GROUP_ID, $counseling->getClassGroupId());
         $c->add(StudentAccalPeer::STUDENT_ID, $student_id);
         $sa = StudentAccalPeer::doSelectOne($c);
         if ($sa == null) {
             $sa = new StudentAccal();
         }
         $sa->setStudentId($student_id);
         $sa->setAcademicCalendarId($academic_calendar->getId());
         $sa->setClassGroupId($counseling->getClassGroupId());
         $sa->setAvgScore($avgScore);
         $sa->save();
     }
     $statues = $this->getRequestParameter('status');
     foreach ($statues as $student_id => $status) {
         $cr = new Criteria();
         $cr->add(StudentRaportPeer::STUDENT_ID, $student_id);
         $cr->add(StudentRaportPeer::CLASS_GROUP_ID, $counseling->getClassGroupId());
         $cr->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
         $cr->add(StudentRaportPeer::GRADE_SPEC_ID, 57);
         $sr = StudentRaportPeer::doSelectOne($cr);
         if ($sr == null) {
             $sr = new StudentRaport();
         }
         $sr->setStudentId($student_id);
         $sr->setAcademicCalendarId($academic_calendar->getId());
         $sr->setClassGroupId($counseling->getClassGroupId());
         $sr->setGradeSpecId(57);
         $sr->setRemark($status);
         $sr->save();
     }
     $scores = $this->getRequestParameter('score');
     foreach ($scores as $k => $score) {
         if ($score != null) {
             if ($score != '-') {
                 $ids = split('_', $k);
                 $cb = new Criteria();
                 $cb->add(StudentHabitPeer::CLASS_GROUP_ID, $counseling->getClassGroupId());
                 $cb->add(StudentHabitPeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
                 $cb->add(StudentHabitPeer::STUDENT_ID, $ids[0]);
                 $cb->add(StudentHabitPeer::GRADE_COMPONENT_ID, $ids[1]);
                 $sh = StudentHabitPeer::doSelectOne($cb);
                 if ($sh == null) {
                     $sh = new StudentHabit();
                 }
                 $sh->setStudentId($ids[0]);
                 $sh->setGradeComponentId($ids[1]);
                 $sh->setAcademicCalendarId($academic_calendar->getId());
                 $sh->setClassGroupId($counseling->getClassGroupId());
                 $sh->setGrade($score);
                 $sh->save();
             } else {
                 $ids = split('_', $k);
                 $cb = new Criteria();
                 $cb->add(StudentHabitPeer::CLASS_GROUP_ID, $counseling->getClassGroupId());
                 $cb->add(StudentHabitPeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
                 $cb->add(StudentHabitPeer::STUDENT_ID, $ids[0]);
                 $cb->add(StudentHabitPeer::GRADE_COMPONENT_ID, $ids[1]);
                 $sh = StudentHabitPeer::doSelectOne($cb);
//.........这里部分代码省略.........
开发者ID:taryono,项目名称:school,代码行数:101,代码来源:actions.class.php

示例5: foreach

        if ($course_details < 1) {
            echo '-';
        } else {
            foreach ($cs_details as $detail) {
                echo $detail->getClassSession()->getBegin() . '&nbsp;-&nbsp;' . $detail->getClassSession()->getEnd() . '<br>';
            }
        }
        ?>
                		</td>
				<td style="white-space: nowrap;width: 1%;" align="left">
				<?php 
        $c = new Criteria();
        $c->add(StudentRaportPeer::STUDENT_ID, $student->getId());
        $c->add(StudentRaportPeer::GRADE_COMPONENT_ID, $grade_component->getId());
        $c->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $accal);
        $sr = StudentRaportPeer::doSelectOne($c);
        if ($sr != null) {
            if ($sr->getGrade() == '80') {
                echo "<font class='level_green'>" . __('A') . "</font>";
            } elseif ($sr->getGrade() == '70') {
                echo "<font class='level_green'>" . __('B') . "</font>";
            } elseif ($sr->getGrade() == '60') {
                echo "<font class='level_yellow'>" . __('C') . "</font>";
            } elseif ($sr->getGrade() == '50') {
                echo "<font class='level_red'>" . __('D') . "</font>";
            } else {
                echo '-';
            }
        } else {
            echo '-';
        }
开发者ID:taryono,项目名称:school,代码行数:31,代码来源:listAsPDFSuccess.php

示例6: executeSaveUpload

 public function executeSaveUpload()
 {
     $scores = $this->getRequestParameter('score');
     $id_course = 0;
     $id_student = 0;
     foreach ($scores as $k => $score) {
         if ($score != null) {
             if ($score != '-') {
                 $ids = split('_', $k);
                 $course_schedule = CourseSchedulePeer::retrieveByPK($ids[1]);
                 $id_course = $course_schedule->getId();
                 $student = StudentPeer::retrieveByPK($ids[0]);
                 $id_student = $student->getId();
                 $cd = new Criteria();
                 $cd->add(StudentAccalPeer::STUDENT_ID, $ids[0]);
                 $cd->add(StudentAccalPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
                 $cd->add(StudentAccalPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
                 $stu_accal = StudentAccalPeer::doSelectOne($cd);
                 $c = new Criteria();
                 $c->add(StudentRaportPeer::STUDENT_ID, $ids[0]);
                 $c->add(StudentRaportPeer::GRADE_SPEC_ID, $ids[2]);
                 $c->add(StudentRaportPeer::SUBJECT_CURR_ID, $course_schedule->getSubjectCurrId());
                 $c->add(StudentRaportPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
                 $c->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
                 $g = StudentRaportPeer::doSelectOne($c);
                 if ($g == null) {
                     $g = new StudentRaport();
                 }
                 $g->setStudentId($ids[0]);
                 $g->setGradeSpecId($ids[2]);
                 $g->setGrade($score);
                 $g->setSubjectCurrId($course_schedule->getSubjectCurrId());
                 $g->setClassGroupId($course_schedule->getClassGroupId());
                 $g->setAcademicCalendarId($course_schedule->getAcademicCalendarId());
                 $g->setCitationId($stu_accal->getId());
                 $g->save();
             } else {
                 $ids = split('_', $k);
                 $course_schedule = CourseSchedulePeer::retrieveByPK($ids[1]);
                 $c = new Criteria();
                 $c->add(StudentRaportPeer::STUDENT_ID, $ids[0]);
                 $c->add(StudentRaportPeer::GRADE_SPEC_ID, $ids[2]);
                 $c->add(StudentRaportPeer::SUBJECT_CURR_ID, $course_schedule->getSubjectCurrId());
                 $c->add(StudentRaportPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
                 $c->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
                 $g = StudentRaportPeer::doSelectOne($c);
                 if ($g != null) {
                     $g->delete();
                 }
             }
         }
     }
     $hiddenscores = $this->getRequestParameter('hiddenscore');
     foreach ($hiddenscores as $j => $hiddenscore) {
         $ids = split('_', $j);
         $course_schedule = CourseSchedulePeer::retrieveByPK($ids[1]);
         $student = StudentPeer::retrieveByPK($ids[0]);
         $cd = new Criteria();
         $cd->add(StudentAccalPeer::STUDENT_ID, $ids[0]);
         $cd->add(StudentAccalPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
         $cd->add(StudentAccalPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
         $stu_accal = StudentAccalPeer::doSelectOne($cd);
         $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());
         $c_regulation = CourseRegulationPeer::doSelectOne($cw);
         if ($c_regulation) {
             $cr = new Criteria();
             $cr->add(GradeSpecPeer::PARENT, 1);
             $cr->addAscendingOrderByColumn(GradeSpecPeer::ID);
             $grade1 = GradeSpecPeer::doSelect($cr);
             $count1 = GradeSpecPeer::doCount($cr);
             $ct = new Criteria();
             $ct->add(GradeSpecPeer::PARENT, 7);
             $ct->addAscendingOrderByColumn(GradeSpecPeer::ID);
             $grade2 = GradeSpecPeer::doSelect($ct);
             $count2 = GradeSpecPeer::doCount($ct);
             $student_grades = array();
             $student_total_grades = 0;
             $student_grade_count = 0;
             $student_grades2 = array();
             $student_total_grades2 = 0;
             $student_grade_count2 = 0;
             $connection = Propel::getConnection();
             $statement = $connection->createStatement();
             $sql = "SELECT grade_spec_id, sum(grade) grade FROM grade_spec g left outer join student_raport s on grade_spec_id = g.id WHERE PARENT=" . $grade1[0]->getParent() . " and student_id = " . $student->getId() . " and subject_curr_id = " . $course_schedule->getSubjectCurrId() . " and class_group_id = " . $course_schedule->getClassGroupId() . " and academic_calendar_id = " . $course_schedule->getAcademicCalendarId() . " group by student_id, subject_curr_id, class_group_id, academic_calendar_id, grade_spec_id";
             $result = $statement->executeQuery($sql, ResultSet::FETCHMODE_NUM);
             while ($result->next()) {
                 $ra = $result->getRow();
                 $student_grades[$ra[0]] = $ra[1];
                 $student_total_grades += $ra[1];
                 $student_grade_count += 1;
             }
             $sql2 = "SELECT grade_spec_id, sum(grade) grade FROM grade_spec g left outer join student_raport s on grade_spec_id = g.id WHERE PARENT=" . $grade2[0]->getParent() . " and student_id = " . $student->getId() . " and subject_curr_id = " . $course_schedule->getSubjectCurrId() . " and class_group_id = " . $course_schedule->getClassGroupId() . " and academic_calendar_id = " . $course_schedule->getAcademicCalendarId() . " group by student_id, subject_curr_id, class_group_id, academic_calendar_id, grade_spec_id";
             $result2 = $statement->executeQuery($sql2, ResultSet::FETCHMODE_NUM);
             while ($result2->next()) {
                 $ra2 = $result2->getRow();
                 $student_grades2[$ra2[0]] = $ra2[1];
                 $student_total_grades2 += $ra2[1];
//.........这里部分代码省略.........
开发者ID:taryono,项目名称:school,代码行数:101,代码来源:actions.class.php

示例7: executeSaveUploadKnowledge

 public function executeSaveUploadKnowledge()
 {
     $scores = $this->getRequestParameter('score');
     $id_course = 0;
     foreach ($scores as $k => $score) {
         if ($score != null) {
             if ($score != '-') {
                 $ids = split('_', $k);
                 #$ids [0] == Id Student
                 #$ids [1] == Id Course Schedule
                 #$ids [2] == Id Grade Spec
                 $course_schedule = CourseSchedulePeer::retrieveByPK($ids[1]);
                 $id_course = $course_schedule->getId();
                 $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());
                 $c_regulation = CourseRegulationPeer::doSelectOne($cw);
                 $cd = new Criteria();
                 $cd->add(StudentAccalPeer::STUDENT_ID, $ids[0]);
                 $cd->add(StudentAccalPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
                 $cd->add(StudentAccalPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
                 $stu_accal = StudentAccalPeer::doSelectOne($cd);
                 if ($ids[2] == 92) {
                     $cm = new Criteria();
                     $cm->add(CourseRegulationPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
                     $cm->add(CourseRegulationPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
                     $cm->add(CourseRegulationPeer::SUBJECT_CURR_ID, $course_schedule->getSubjectCurrId());
                     $c_regulation = CourseRegulationPeer::doSelectOne($cm);
                     $c = new Criteria();
                     $c->add(StudentRaportPeer::STUDENT_ID, $ids[0]);
                     $c->add(StudentRaportPeer::GRADE_SPEC_ID, $ids[2]);
                     $c->add(StudentRaportPeer::SUBJECT_CURR_ID, $course_schedule->getSubjectCurrId());
                     $c->add(StudentRaportPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
                     $c->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
                     $g = StudentRaportPeer::doSelectOne($c);
                     if ($g == null) {
                         $g = new StudentRaport();
                     }
                     $g->setStudentId($ids[0]);
                     $g->setGradeSpecId($ids[2]);
                     $g->setGrade($score);
                     $g->setSubjectCurrId($course_schedule->getSubjectCurrId());
                     $g->setClassGroupId($course_schedule->getClassGroupId());
                     $g->setAcademicCalendarId($course_schedule->getAcademicCalendarId());
                     $g->setCitationId($stu_accal->getId());
                     $g->save();
                     if ($c_regulation) {
                         $cg = new Criteria();
                         $cg->add(StudentRaportPeer::STUDENT_ID, $ids[0]);
                         $cg->add(StudentRaportPeer::GRADE_SPEC_ID, $ids[2]);
                         $cg->add(StudentRaportPeer::SUBJECT_CURR_ID, $course_schedule->getSubjectCurrId());
                         $cg->add(StudentRaportPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
                         $cg->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
                         $nr = StudentRaportPeer::doSelectOne($cg);
                         $f = new Criteria();
                         $f->add(StudentRaportPeer::STUDENT_ID, $ids[0]);
                         $f->add(StudentRaportPeer::GRADE_SPEC_ID, 14);
                         $f->add(StudentRaportPeer::SUBJECT_CURR_ID, $course_schedule->getSubjectCurrId());
                         $f->add(StudentRaportPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
                         $f->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
                         $uh = StudentRaportPeer::doSelectOne($f);
                         if ($nr->getGrade() >= $c_regulation->getKkm()) {
                             if ($uh == null) {
                                 $uh = new StudentRaport();
                             }
                             $uh->setStudentId($ids[0]);
                             $uh->setGradeSpecId(14);
                             $uh->setGrade($c_regulation->getKkm());
                             $uh->setSubjectCurrId($course_schedule->getSubjectCurrId());
                             $uh->setClassGroupId($course_schedule->getClassGroupId());
                             $uh->setAcademicCalendarId($course_schedule->getAcademicCalendarId());
                             $uh->setCitationId($stu_accal->getId());
                             $uh->save();
                         } elseif ($nr->getGrade() < $c_regulation->getKkm()) {
                             if ($uh == null) {
                                 $uh = new StudentRaport();
                                 $uh->setStudentId($ids[0]);
                                 $uh->setGradeSpecId(14);
                                 $uh->setGrade($nr->getGrade());
                                 $uh->setSubjectCurrId($course_schedule->getSubjectCurrId());
                                 $uh->setClassGroupId($course_schedule->getClassGroupId());
                                 $uh->setAcademicCalendarId($course_schedule->getAcademicCalendarId());
                                 $uh->setCitationId($stu_accal->getId());
                                 $uh->save();
                             } else {
                                 if ($nr->getGrade() > $uh->getGrade()) {
                                     $uh->setStudentId($ids[0]);
                                     $uh->setGradeSpecId(14);
                                     $uh->setGrade($nr->getGrade());
                                     $uh->setSubjectCurrId($course_schedule->getSubjectCurrId());
                                     $uh->setClassGroupId($course_schedule->getClassGroupId());
                                     $uh->setAcademicCalendarId($course_schedule->getAcademicCalendarId());
                                     $uh->setCitationId($stu_accal->getId());
                                     $uh->save();
                                 }
                             }
                         }
                     }
                 } else {
//.........这里部分代码省略.........
开发者ID:taryono,项目名称:school,代码行数:101,代码来源:actions.class.php

示例8: executeSaveScoreSmp

 public function executeSaveScoreSmp()
 {
     $accal_id = $this->getRequestParameter('accal_id');
     $academic_calendar = AcademicCalendarPeer::retrieveByPK($accal_id);
     $this->forward404Unless($academic_calendar);
     $this->academic_calendar = $academic_calendar;
     $schedule = SchedulePeer::retrieveByPk($this->getRequestParameter('schedule_id'));
     $this->forward404Unless($schedule);
     $this->schedule = $schedule;
     $schedule_detail = ScheduleDetailPeer::retrieveByPk($this->getRequestParameter('detail_id'));
     $this->forward404Unless($schedule_detail);
     $this->schedule_detail = $schedule_detail;
     $class_group = ClassGroupPeer::retrieveByPK($this->getRequestParameter('class_id'));
     $this->forward404Unless($class_group);
     $scores = $this->getRequestParameter('score');
     foreach ($scores as $k => $score) {
         if ($score != null) {
             $cr = new Criteria();
             $cr->add(StudentRaportPeer::GRADE_COMPONENT_ID, $schedule->getGradeComponentId());
             $cr->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $schedule->getAcademicCalendarId());
             $cr->add(StudentRaportPeer::SCHEDULE_DETAIL_ID, $schedule_detail->getId());
             $cr->add(StudentRaportPeer::SCHEDULE_ID, $schedule->getId());
             $cr->add(StudentRaportPeer::CLASS_GROUP_ID, $class_group->getId());
             $cr->add(StudentRaportPeer::STUDENT_ID, $k);
             $sc = StudentRaportPeer::doSelectOne($cr);
             $sc->setStudentId($k);
             $sc->setAcademicCalendarId($schedule->getAcademicCalendarId());
             $sc->setGradeComponentId($schedule->getGradeComponentId());
             $sc->setClassGroupId($class_group->getId());
             $sc->setScheduleId($schedule->getId());
             $sc->setScheduleDetailId($schedule_detail->getId());
             $sc->setGrade($score);
             $sc->save();
         }
     }
     return $this->redirect('extracurricular_new/listEksStu?id=' . $schedule->getId() . '&detail_id=' . $schedule_detail->getId() . '&accal_id=' . $academic_calendar->getId());
 }
开发者ID:taryono,项目名称:school,代码行数:37,代码来源:actions.class.php

示例9: strlen

								<td><?php 
        echo strlen($student->getCode()) > 0 ? $student->getCode() : 'n/a';
        ?>
</td>
								<td><?php 
        echo $student->getName() ? $student->getName() : '-';
        ?>
</td>
								<td><?php 
        $cm = new Criteria();
        $cm->add(StudentRaportPeer::STUDENT_ID, $student->getId());
        $cm->add(StudentRaportPeer::SUBJECT_CURR_ID, $course_schedule->getSubjectCurrId());
        $cm->add(StudentRaportPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
        $cm->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
        $cm->add(StudentRaportPeer::GRADE_SPEC_ID, $grade_spec->getId());
        $sr1 = StudentRaportPeer::doSelectOne($cm);
        echo input_tag('score[' . $student->getId() . '_' . $grade_spec->getId() . ']', $sr1 != null ? $sr1->getGrade() : '', array('size' => 2, 'maxlength' => 5, 'style' => 'font-size: 10px;'));
        ?>
</td>
						   </tr>
						   <?php 
    }
    ?>
						  <?php 
}
?>
						</tbody>
						</table>
						<?php 
if ($pager->getNbResults() > 1) {
    echo include_partial('global/pager', array('position' => 'bottom', 'pager' => $pager, 'module' => 'student'));
开发者ID:taryono,项目名称:school,代码行数:31,代码来源:getListSuccess.php

示例10: executeUpdateDev

 public function executeUpdateDev()
 {
     $student_id = $this->getRequestParameter('student_id');
     $student = StudentPeer::retrieveByPK($student_id);
     $this->forward404Unless($student);
     $this->student = $student;
     $scores = $this->getRequestParameter('score');
     foreach ($scores as $k => $score) {
         if ($score != null) {
             $ids = split('_', $k);
             $c = new Criteria();
             $c->add(StudentRaportPeer::STUDENT_COURSE_ID, $ids[0]);
             $c->add(StudentRaportPeer::GRADE_COMPONENT_ID, $ids[1]);
             $g = StudentRaportPeer::doSelectOne($c);
             if ($g == null) {
                 $g = new StudentRaport();
             }
             $g->setStudentCourseId($ids[0]);
             $g->setGradeComponentId($ids[1]);
             $g->setGrade($score);
             $g->save();
         }
     }
     return $this->redirect('student_score/listDev?student_id=' . $student->getId());
 }
开发者ID:taryono,项目名称:school,代码行数:25,代码来源:actions.class.php

示例11: executeSaveRaportHistory

 public function executeSaveRaportHistory()
 {
     $course_id = $this->getRequestParameter('course_id');
     $course_schedule = CourseSchedulePeer::retrieveByPK($course_id);
     $this->forward404Unless($course_schedule);
     $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());
     $c_regulation = CourseRegulationPeer::doSelectOne($cw);
     if ($c_regulation) {
         $scores = $this->getRequestParameter('score');
         foreach ($scores as $k => $score) {
             if ($score != null) {
                 if ($score != '-') {
                     $ids = split('_', $k);
                     $cd = new Criteria();
                     $cd->add(StudentAccalPeer::STUDENT_ID, $ids[0]);
                     $cd->add(StudentAccalPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
                     $cd->add(StudentAccalPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
                     $stu_accal = StudentAccalPeer::doSelectOne($cd);
                     $c = new Criteria();
                     $c->add(StudentRaportPeer::STUDENT_ID, $ids[0]);
                     $c->add(StudentRaportPeer::GRADE_SPEC_ID, $ids[1]);
                     $c->add(StudentRaportPeer::SUBJECT_CURR_ID, $course_schedule->getSubjectCurrId());
                     $c->add(StudentRaportPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
                     $c->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
                     $g = StudentRaportPeer::doSelectOne($c);
                     if ($g == null) {
                         $g = new StudentRaport();
                     }
                     $g->setStudentId($ids[0]);
                     $g->setGradeSpecId($ids[1]);
                     $g->setGrade($score);
                     $g->setSubjectCurrId($course_schedule->getSubjectCurrId());
                     $g->setClassGroupId($course_schedule->getClassGroupId());
                     $g->setAcademicCalendarId($course_schedule->getAcademicCalendarId());
                     $g->setCitationId($stu_accal->getId());
                     $g->save();
                 } else {
                     $ids = split('_', $k);
                     $c = new Criteria();
                     $c->add(StudentRaportPeer::STUDENT_ID, $ids[0]);
                     $c->add(StudentRaportPeer::GRADE_SPEC_ID, $ids[1]);
                     $c->add(StudentRaportPeer::SUBJECT_CURR_ID, $course_schedule->getSubjectCurrId());
                     $c->add(StudentRaportPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
                     $c->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
                     $g = StudentRaportPeer::doSelectOne($c);
                     if ($g != null) {
                         $g->delete();
                     }
                 }
             }
         }
         #Nilai Utama dan Remed
         $exams = $this->getRequestParameter('exam');
         foreach ($exams as $k => $exam) {
             if ($exam != null) {
                 if ($exam != '-') {
                     $ids = split('_', $k);
                     $cd = new Criteria();
                     $cd->add(StudentAccalPeer::STUDENT_ID, $ids[0]);
                     $cd->add(StudentAccalPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
                     $cd->add(StudentAccalPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
                     $stu_accal = StudentAccalPeer::doSelectOne($cd);
                     $c = new Criteria();
                     $c->add(StudentRaportPeer::STUDENT_ID, $ids[0]);
                     $c->add(StudentRaportPeer::GRADE_SPEC_ID, $ids[1]);
                     $c->add(StudentRaportPeer::SUBJECT_CURR_ID, $course_schedule->getSubjectCurrId());
                     $c->add(StudentRaportPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
                     $c->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
                     $g = StudentRaportPeer::doSelectOne($c);
                     if ($g == null) {
                         $g = new StudentRaport();
                     }
                     $g->setStudentId($ids[0]);
                     $g->setGradeSpecId($ids[1]);
                     $g->setGrade($exam);
                     $g->setSubjectCurrId($course_schedule->getSubjectCurrId());
                     $g->setClassGroupId($course_schedule->getClassGroupId());
                     $g->setAcademicCalendarId($course_schedule->getAcademicCalendarId());
                     $g->setCitationId($stu_accal->getId());
                     $g->save();
                     $grade_spec = GradeSpecPeer::retrieveByPK($ids[1]);
                     #Nilai Utama
                     if ($grade_spec->getCode() == 'NU') {
                         $cg = new Criteria();
                         $cg->add(StudentRaportPeer::STUDENT_ID, $ids[0]);
                         $cg->add(StudentRaportPeer::GRADE_SPEC_ID, $grade_spec->getId());
                         $cg->add(StudentRaportPeer::SUBJECT_CURR_ID, $course_schedule->getSubjectCurrId());
                         $cg->add(StudentRaportPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
                         $cg->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
                         $nu = StudentRaportPeer::doSelectOne($cg);
                         $f = new Criteria();
                         $f->add(StudentRaportPeer::STUDENT_ID, $ids[0]);
                         $f->add(StudentRaportPeer::GRADE_SPEC_ID, $grade_spec->getParent());
                         $f->add(StudentRaportPeer::SUBJECT_CURR_ID, $course_schedule->getSubjectCurrId());
                         $f->add(StudentRaportPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
                         $f->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
                         $uh = StudentRaportPeer::doSelectOne($f);
//.........这里部分代码省略.........
开发者ID:taryono,项目名称:school,代码行数:101,代码来源:actions.class1.php

示例12: executeUpdateScore

 public function executeUpdateScore()
 {
     $subject_id = $this->getRequestParameter('subject_id');
     $class_id = $this->getRequestParameter('class_id');
     $accal_id = $this->getRequestParameter('accal_id');
     $academic_calendar = AcademicCalendarPeer::retrieveByPK($accal_id);
     $scores = $this->getRequestParameter('score');
     foreach ($scores as $k => $score) {
         if ($score != null) {
             if ($score != '-') {
                 $ids = split('_', $k);
                 $c = new Criteria();
                 $c->add(StudentRaportPeer::STUDENT_ID, $ids[0]);
                 $c->add(StudentRaportPeer::GRADE_SPEC_ID, $ids[1]);
                 $c->add(StudentRaportPeer::SUBJECT_CURR_ID, $subject_id);
                 $c->add(StudentRaportPeer::CLASS_GROUP_ID, $class_id);
                 $c->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $accal_id);
                 $g = StudentRaportPeer::doSelectOne($c);
                 if ($g == null) {
                     $g = new StudentRaport();
                 }
                 $g->setStudentId($ids[0]);
                 $g->setGradeSpecId($ids[1]);
                 $g->setGrade($score);
                 $g->setSubjectCurrId($subject_id);
                 $g->setClassGroupId($class_id);
                 $g->setAcademicCalendarId($accal_id);
                 $g->save();
             } else {
                 $ids = split('_', $k);
                 $c = new Criteria();
                 $c->add(StudentRaportPeer::STUDENT_ID, $ids[0]);
                 $c->add(StudentRaportPeer::GRADE_SPEC_ID, $ids[1]);
                 $c->add(StudentRaportPeer::SUBJECT_CURR_ID, $subject_id);
                 $c->add(StudentRaportPeer::CLASS_GROUP_ID, $class_id);
                 $c->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $accal_id);
                 $g = StudentRaportPeer::doSelectOne($c);
                 if ($g != null) {
                     $g->delete();
                 }
             }
         }
     }
     if ($academic_calendar->getCourseModel() == 'A') {
         return $this->redirect('course/listScore?employee_id=' . $this->getRequestParameter('employee_id'));
     } else {
         return $this->redirect('course/listScore2?employee_id=' . $this->getRequestParameter('employee_id'));
     }
 }
开发者ID:taryono,项目名称:school,代码行数:49,代码来源:actions.class.php


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