Пример #1
0
	/**
	 * @param	CreditEcts $creditEcts The creditEcts object to add.
	 */
	protected function doAddCreditEcts($creditEcts)
	{
		$this->collCreditEctss[]= $creditEcts;
		$creditEcts->setEleve($this);
	}
Пример #2
0
	/**
	 * Filter the query by a related CreditEcts object
	 *
	 * @param     CreditEcts $creditEcts  the related object to use as filter
	 * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
	 *
	 * @return    GroupeQuery The current query, for fluid interface
	 */
	public function filterByCreditEcts($creditEcts, $comparison = null)
	{
		if ($creditEcts instanceof CreditEcts) {
			return $this
				->addUsingAlias(GroupePeer::ID, $creditEcts->getIdGroupe(), $comparison);
		} elseif ($creditEcts instanceof PropelCollection) {
			return $this
				->useCreditEctsQuery()
				->filterByPrimaryKeys($creditEcts->getPrimaryKeys())
				->endUse();
		} else {
			throw new PropelException('filterByCreditEcts() only accepts arguments of type CreditEcts or PropelCollection');
		}
	}
Пример #3
0
	/**
	 * Exclude object from result
	 *
	 * @param     CreditEcts $creditEcts Object to remove from the list of results
	 *
	 * @return    CreditEctsQuery The current query, for fluid interface
	 */
	public function prune($creditEcts = null)
	{
		if ($creditEcts) {
			$this->addCond('pruneCond0', $this->getAliasedColName(CreditEctsPeer::ID), $creditEcts->getId(), Criteria::NOT_EQUAL);
			$this->addCond('pruneCond1', $this->getAliasedColName(CreditEctsPeer::ID_ELEVE), $creditEcts->getIdEleve(), Criteria::NOT_EQUAL);
			$this->addCond('pruneCond2', $this->getAliasedColName(CreditEctsPeer::NUM_PERIODE), $creditEcts->getNumPeriode(), Criteria::NOT_EQUAL);
			$this->addCond('pruneCond3', $this->getAliasedColName(CreditEctsPeer::ID_GROUPE), $creditEcts->getIdGroupe(), Criteria::NOT_EQUAL);
			$this->combine(array('pruneCond0', 'pruneCond1', 'pruneCond2', 'pruneCond3'), Criteria::LOGICAL_OR);
		}

		return $this;
	}
Пример #4
0
    /**
	 * Enregistre les crédits ECTS pour une période et un groupe
	 */
	public function setEctsCredit($periode,$id_groupe,$valeur_ects,$mention_ects,$mention_prof = null) {
        $credit = $this->getEctsCredit($periode,$id_groupe);
        if ($credit == null) {
            $credit = new CreditEcts();
            $credit->setEleve($this);
            $credit->setIdGroupe($id_groupe);
            $credit->setNumPeriode($periode);
        }
        // Si on enregistre une pré-saisie, alors on n'enregistre que ça, sans toucher au reste.
        if ($mention_prof) {
          $credit->setMentionProf($mention_prof);
        } else {
          $credit->setValeur($valeur_ects);
          $credit->setMention($mention_ects);
        }
        return $credit->save();
	}