Exemple #1
0
$raports1 = VStudentRaportPeer::doSelect($cw);
$count_raport1 = VStudentRaportPeer::doCount($cw);
$total_score1 = 0;
foreach ($raports1 as $c) {
    $total_score1 += $c->getGrade();
}
$avg1 = round($total_score1 / $count_raport1);
$grade2_ids = array();
foreach ($grade2 as $g2) {
    $grade2_ids[] = $g2->getId();
}
$cw = new Criteria();
$cw->add(VStudentRaportPeer::STUDENT_ACCAL_ID, $student_accal->getId(), Criteria::IN);
$cw->add(VStudentRaportPeer::SUBJECT_CURR_ID, $course_schedule->getSubjectCurrId(), Criteria::IN);
$cw->add(VStudentRaportPeer::GRADE_SPEC_ID, $grade2_ids, Criteria::IN);
$raports2 = VStudentRaportPeer::doSelect($cw);
$count_raport2 = VStudentRaportPeer::doCount($cw);
$total_score2 = 0;
foreach ($raports2 as $c) {
    $total_score2 += $c->getGrade();
}
$avg2 = round($total_score2 / $count_raport2);
?>
</td>

<td width="70%" valign="top">

	<table class="form">
	<tr><td class="form">
		<table class="form_content" width="100%">
			<tbody>
 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(VStudentRaportPeer::ID, $pks, Criteria::IN);
         $objs = VStudentRaportPeer::doSelect($criteria, $con);
     }
     return $objs;
 }
Exemple #3
0
 public function getVStudentRaports($criteria = null, $con = null)
 {
     include_once 'lib/model/om/BaseVStudentRaportPeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collVStudentRaports === null) {
         if ($this->isNew()) {
             $this->collVStudentRaports = array();
         } else {
             $criteria->add(VStudentRaportPeer::STUDENT_ACCAL_ID, $this->getId());
             VStudentRaportPeer::addSelectColumns($criteria);
             $this->collVStudentRaports = VStudentRaportPeer::doSelect($criteria, $con);
         }
     } else {
         if (!$this->isNew()) {
             $criteria->add(VStudentRaportPeer::STUDENT_ACCAL_ID, $this->getId());
             VStudentRaportPeer::addSelectColumns($criteria);
             if (!isset($this->lastVStudentRaportCriteria) || !$this->lastVStudentRaportCriteria->equals($criteria)) {
                 $this->collVStudentRaports = VStudentRaportPeer::doSelect($criteria, $con);
             }
         }
     }
     $this->lastVStudentRaportCriteria = $criteria;
     return $this->collVStudentRaports;
 }