1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
public function emargementsParCours(EntityManagerInterface $em, Request $request): Response
{
$session = $this->get('session');
$user = $this->getUser();
$teacherId = $user->getId();
$idCours = $request->get('idCours');
//dd($idCours);
$utilisateurEtudiant = $this->getDoctrine()->getRepository(Utilisateur::class)->find($user);
$listeDePointage = $em->getRepository(ProfCours::class)->findHorairesParCours($em, $teacherId, $idCours);
return $this->render('profEmargementsParCours.twig', array(
'listeDePointage' => $listeDePointage,
'prenom' => $user->getPrenomUtilisateur(),
'nom' => $user->getNomUtilisateur()));
}
public function listeEmargementsPassesParCours(EntityManagerInterface $em, Request $request): Response
{
$pasdePointage = pasPointer($idCours, $idDate, $idCreneau);
return $this->render('panelProfListeEmargements.twig', array(
'pasdePointage' => $pasdePointage,
'prenom' => $user->getPrenomUtilisateur(),
'nom' => $user->getNomUtilisateur()));
}
public function pasPointer($idCours, $idDate, $idCreneau) {
$requestPasPointer = "SELECT ec.etudiant
FROM etudiant_cours ec
left JOIN pointage po
inner JOIN utilisateur u
on u.id = po.utilisateur_etudiant_id
inner JOIN cours_planning cp
on cp.id = po.cours_id
and cp.cours = :conditions_particulieres_generales_client
and cp.plage_horaire_id = :conditions_particulieres_generales_client
and cp.date_cours = :conditions_particulieres_generales_client
ON po.utilisateur_etudiant_id = ec.etudiant
where po.utilisateur_etudiant_id is null";
$exectPasPointer = $bdd->prepare( $requestPasPointer );
$exectPasPointer->execute( array(
':idCours' => $idCours,
':idDate' => $idDate,
':idCreneau' => $idCreneau
));
} |
Partager