Example #1
0
 public static function getAllActif() {
   $parents = parent::getAllActif();
   $return = array();
   foreach ($parents as $parent) {
     if ($parent->estEleve())
       $return[] = Eleve::getById($parent->getIdUtilisateur());
   }
   return $return;
 }
Example #2
0
	public function getEleves(){
		$query = "SELECT * FROM ELEVE_RESPONSABLE WHERE idResponsable = " . $this->getIdResponsable();
		$result = db_connect::query($query);
		$return = array ();
		if ($result->num_rows > 0) {
			while ($info = $result->fetch_assoc()) {
				$return[] = Eleve::getById($info['idEleve']);
			}
		}
		return $return;
	}
Example #3
0
<?php

/**
 * Created by PhpStorm.
 * User: Jean-Baptiste
 * Date: 03/12/2015
 * Time: 21:31
 */
require_once '../Require/Objects.php';
$idTrimestre = $_POST['idTrimestre'];
$idEleve = $_POST['idEleve'];
$trimestre = Trimestre::getById($idTrimestre);
$eleve = Eleve::getById($idEleve);
function afficheNote($maxEval, $note)
{
    $laNote = number_format($note, 2, ',', ' ');
    switch ($maxEval) {
        case 10:
            echo '
			<td class="Evaluation nivCpt">' . $laNote . '</td>
			<td class="Evaluation nivCpt"></td>';
            break;
        case 20:
            echo '
			<td class="Evaluation nivCpt"></td>
			<td class="Evaluation nivCpt">' . $laNote . '</td>';
            break;
        default:
            echo '
			<td class="Evaluation nivCpt"></td>
			<td class="Evaluation nivCpt"></td>';
Example #4
0
			$eleve = Eleve::getById($_GET['idEleve']);
			$bulletin = Bulletin::getByEleveMatiereNiveauTrimestre($eleve->getIdEleve(), $matiereNiveau->getIdMatiereNiveau(), $trimestre->getIdTrimestre());
			if (!$bulletin->getIdBulletin()){
				$ret = array();
				$ret['contenuBulletin'] = '';
				$ret['idBulletin'] = '';
				echo json_encode($ret);
				break;
			}
			echo json_encode($bulletin->toArray());
			break;
		case 'addCommentaire':
			//idEleve: idEleve, idMatiere: idMatiere, idNiveau: idNiveau, idTrimestre:idTrimestre, idBulletin: idBulletin, commBulletin: commBulletin, action: 'addCommentaire'
			$trimestre = Trimestre::getById($_GET['idTrimestre']);
			$matiereNiveau = MatiereNiveau::getByMatiereNiveau($_GET['idMatiere'], $_GET['idNiveau']);
			$eleve = Eleve::getById($_GET['idEleve']);

			$bulletin = new Bulletin();
			if ($_GET['idBulletin'] == 0){
				$bulletin->setIdEleve($eleve->getIdUtilisateur());
				$bulletin->setIdMatiereNiveau($matiereNiveau->getIdMatiereNiveau());
				$bulletin->setContenuBulletin($_GET['commBulletin']);
				$bulletin->setDateRedacton(date('Y-m-d'));
				$bulletin->insert();
			}
			else {
				$bulletin = Bulletin::getById($_GET['idBulletin']);
				$bulletin->setContenuBulletin($_GET['commBulletin']);
				//$bulletin->setDateRedacton(date('Y-m-d'));
				$bulletin->update();
			}
Example #5
0
	public function getEleve(){
		return Eleve::getById($this->getIdEleve());
	}
Example #6
0
switch ($_GET['action']) {
    case 'getFonctionUtilisateur':
        $utilisateur = Utilisateur::getById($_GET['idUtilisateur']);
        $return = array();
        $return['niveau'] = '';
        if ($utilisateur->estAdministrateur())
            $return['administrateur'] = 'TRUE';
        else
            $return['administrateur'] = 'FALSE';

        if ($utilisateur->estProfesseur())
            $return['professeur'] = 'TRUE';
        else
            $return['professeur'] = 'FALSE';

        if ($utilisateur->estResponsable())
            $return['responsable'] = 'TRUE';
        else
            $return['responsable'] = 'FALSE';

        if ($utilisateur->estEleve()){
            $return['eleve']='TRUE';
            $eleve = Eleve::getById($utilisateur->getIdUtilisateur());
            $return['niveau']=$eleve->getIdNiveau();
        }
        else
            $return['eleve']='FALSE';
        echo json_encode($return);
        break;
}