/** * Permet de mettre à jour les données de la BDD */ public function save() { return MatiereDAO::update($this); }
public function loadMatieres() { Load::DAO("matiere"); $this->matieres = MatiereDAO::findByFormation($this->id); }
public function loadMatieres() { $this->matieres = MatiereDAO::findByEnseignant($this->id); }
public function test_matiereFindByEnseignant() { $matiere = MatiereDAO::findByEnseignant(1); $this->message["mat_findByEns_mess"] = "Attendu : 4 - Trouver : " . ($matiere ? count($matiere) : "rien"); return count($matiere) === 4; }
<?php include './DAO/DAO.class.php'; include './DAO/ProfDAO.class.php'; include './DAO/CoursDAO.class.php'; include './DAO/MatiereDAO.class.php'; include './DAO/TypeDAO.class.php'; $profdao = new ProfDAO(); $coursdao = new CoursDAO(); $matieredao = new MatiereDAO(); $typedao = new TypeDAO(); $prof = $profdao->getProfByEmail('*****@*****.**'); $ArrayCours = $coursdao->getCoursByProf($prof); foreach ($ArrayCours as $row) { $ArrayType[] = $typedao->getTypeByNoTypeOfCours($row->getNo_type()); $ArrayMatiere[] = $matieredao->getMatiereByNoMatiereOfCours($row->getNo_matiere()); } ?> <html> <head> <title>Cours</title> </head> <body> <?php $i = 0; foreach ($ArrayCours as $row) { echo "<button type=\"button\">" . $ArrayMatiere[$i]->getNom() . " " . $ArrayType[$i]->getNom() . "</button>"; $i++; } ?> </body>
<?php include 'DAO\\DAO.class.php'; include 'DAO\\ProfDAO.class.php'; include 'DAO\\CoursDAO.class.php'; include 'DAO\\TypeDAO.class.php'; include 'DAO\\MatiereDAO.class.php'; include 'DAO\\SectionDAO.class.php'; include 'DAO\\SeanceDAO.class.php'; include 'DAO\\EtudiantDAO.class.php'; include 'DAO\\AbsentDAO.class.php'; $profdao = new ProfDAO(); $coursdao = new CoursDAO(); $typedao = new TypeDAO(); $matieredao = new MatiereDAO(); $sectiondao = new SectionDAO(); $seancedao = new SeanceDAO(); $etudiantdao = new EtudiantDAO(); $absentdao = new AbsentDAO(); $ArrayProf = $profdao->getListe(); $prof = $profdao->getProfByEmail('*****@*****.**'); $ArrayCours = $coursdao->getCoursByNoProf($prof->getNo_prof()); foreach ($ArrayCours as $row) { $type = $typedao->getTypeByNoTypeOfCours($row->getNo_type()); $matiere = $matieredao->getMatiereByNoMatiereOfCours($row->getNo_matiere()); $section = $sectiondao->getSectionByNoSectionOfMatiere($matiere->getNo_section()); echo $row->getNo_cours() . " " . $prof->getNom() . " " . $type->getNom() . " " . $matiere->getInitiales() . " " . $section->getNom() . ".</br>"; echo $matiere->getNom() . " (" . $row->getNo_cours() . ") :</br>"; $ArraySeance = $seancedao->getSeanceByNoCours($row->getNo_cours()); foreach ($ArraySeance as $row2) { echo $row2->getNo_seance() . " : " . $row2->getNo_ordre() . " groupe : " . $row2->getNo_groupe() . "." . $row2->getNo_sous_groupe() . " : </br>";