Пример #1
0
        }
        ?>
                                            <td align="center" style="text-align:center">
                                                    <?php 
        $grade1_ids = array();
        foreach ($grade1 as $g1) {
            $grade1_ids[] = $g1->getId();
        }
        $cw = new Criteria();
        $cw->add(StudentTryoutPeer::STUDENT_ID, $student->getId(), Criteria::IN);
        $cw->add(StudentTryoutPeer::SUBJECT_CURR_ID, $course_schedule->getSubjectCurrId(), Criteria::IN);
        $cw->add(StudentTryoutPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId(), Criteria::IN);
        $cw->add(StudentTryoutPeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId(), Criteria::IN);
        $cw->add(StudentTryoutPeer::GRADE_SPEC_ID, $grade1_ids, Criteria::IN);
        $raports = StudentTryoutPeer::doSelect($cw);
        $count_raport = StudentTryoutPeer::doCount($cw);
        $total_score = 0;
        foreach ($raports as $c) {
            $total_score += $c->getGrade();
        }
        ?>
                
                                                    <input type="text" readonly="readonly" size="1" value="<?php 
        echo $total_score ? round($total_score / $count_raport) : '-';
        ?>
" id="scoreNRM" name="scoreNRM" style="border: 1px solid green;"/>
                                            </td>                                   
                                        </tr>
                                <?php 
    }
    ?>