@ -64,6 +64,9 @@ void menu(VilleIUT *tiut[], int *nbIUT, Etudiant *tetud[], int *nbCandidats, boo
case 4 :
case 4 :
menuResponsable ( tetud , * nbCandidats , tiut , nbIUT , tetudAdmis , * nbEtudAdmis , tetudAttente , * nbEtudAttente ) ;
menuResponsable ( tetud , * nbCandidats , tiut , nbIUT , tetudAdmis , * nbEtudAdmis , tetudAttente , * nbEtudAttente ) ;
break ;
break ;
case 5 :
menuPostCandidat ( ) ;
break ;
case 9 :
case 9 :
c = true ;
c = true ;
return ;
return ;
@ -212,7 +215,7 @@ void menuCandidat(VilleIUT *tiut[], int *nbIUT, Etudiant *tetud[], int *nbCandid
printf ( " \t 4 - Supprimer un choix \n " ) ;
printf ( " \t 4 - Supprimer un choix \n " ) ;
printf ( " \t 5 - Modifier un choix \n " ) ;
printf ( " \t 5 - Modifier un choix \n " ) ;
printf ( " \t 9 - Quitter \n " ) ;
printf ( " \t 9 - Quitter \n " ) ;
printf ( " \n Entrez votre choix : \n > " ) ;
printf ( " \n Entrez votre choix : \n > " ) ; //! Comment les identifié ?
scanf ( " %d%*c " , & choix ) ;
scanf ( " %d%*c " , & choix ) ;
switch ( choix )
switch ( choix )
{
{
@ -220,7 +223,7 @@ void menuCandidat(VilleIUT *tiut[], int *nbIUT, Etudiant *tetud[], int *nbCandid
* nbCandidats = inscription ( tetud , * nbCandidats , tiut , * nbIUT ) ;
* nbCandidats = inscription ( tetud , * nbCandidats , tiut , * nbIUT ) ;
break ;
break ;
case 2 :
case 2 :
afficherCandidat ( tetud , * nbCandidats ) ;
afficherCandidat ( tetud , * nbCandidats ) ; //! affiche pas pour celui identifié
break ;
break ;
case 3 :
case 3 :
ajouterCandidature ( tetud , * nbCandidats , tiut , * nbIUT ) ;
ajouterCandidature ( tetud , * nbCandidats , tiut , * nbIUT ) ;
@ -258,43 +261,43 @@ void menuResponsable(Etudiant *tetud[], int nbCandidats, VilleIUT *tiut[], int *
{
{
int choix ;
int choix ;
bool c = false ;
bool c = false ;
float noteMin [ 5 ] ;
Etudiant * tetudResp [ 100 ] , * tetudRespAdmis [ 100 ] , * tetudRespAttente [ 100 ] ;
Etudiant * tetudResp [ 100 ] , * tetudRespAdmis [ 100 ] , * tetudRespAttente [ 100 ] ;
int nbCandidatsDept , nbCandidatsDeptAdmis , nbCandidatsDeptAttente ;
int nbCandidatsDept , nbCandidatsDeptAdmis , nbCandidatsDeptAttente , nbCandidatsDeptRefuse ;
char respVille [ 30 ] , respDept [ 30 ] ;
char respVille [ 30 ] , respDept [ 30 ] ;
moyenneCandidats ( tetud , nbCandidats ) ;
deptResp ( tiut , * nbIUT , respVille , respDept ) ;
deptResp ( tiut , * nbIUT , respVille , respDept ) ;
nbCandidatsDept = chargementRespDept ( tetud , nbCandidats , respVille , respDept , tetudResp ) ; //* Ca marche ca
nbCandidatsDept = chargementRespDept ( tetud , nbCandidats , respVille , respDept , tetudResp ) ; //* Ca marche ca
triNote ( tetudResp , nbCandidatsDept ) ;
triNote ( tetudResp , nbCandidatsDept ) ;
nbCandidatsDeptAdmis = chargementRespDept ( tetudAdmis , nbEtudAdmis , respVille , respDept , tetudRespAdmis ) ; // ? A tester
triNote ( tetudRespAdmis , nbCandidatsDeptAdmis ) ;
nbCandidatsDeptAttente = chargementRespDept ( tetudAttente , nbEtudAttente , respVille , respDept , tetudRespAttente ) ;
triNote ( tetudRespAttente , nbCandidatsDeptAttente ) ;
//! Ajouter la moyenne et nommer deux liste pour admis et en attente
//! Ajouter la moyenne et nommer deux liste pour admis et en attente
while ( c = = false )
while ( c = = false )
{
{
// system("clear");
// system("clear");
printf ( " \n \n Menu des Responsable de Departement : Que voulez-vous faire ? \n " ) ;
printf ( " \n \n Menu des Responsable de Departement : Que voulez-vous faire ? \n " ) ;
printf ( " \t 1 - Lancer les admission s\n " ) ;
printf ( " \t 1 - Affichage s\n " ) ;
printf ( " \t 2 - Affichages \n " ) ;
printf ( " \t 2 - Modifier le nombre de places dans un département \n " ) ;
printf ( " \t 3 - Modifier l e nombre de places dans un dé partement\n " ) ;
printf ( " \t 3 - Modifier l a note minimal d'admission du de partement\n " ) ; // ! A faire
printf ( " \t 4 - Modifier la note minimal d'admission du departement\n " ) ;
printf ( " \t 4 - Lancer les admissions\n " ) ; // ! A revoir
printf ( " \t 9 - Quitter \n " ) ;
printf ( " \t 9 - Quitter \n " ) ;
printf ( " \n Entrez votre choix : \n > " ) ;
printf ( " \n Entrez votre choix : \n > " ) ;
scanf ( " %d%*c " , & choix ) ;
scanf ( " %d%*c " , & choix ) ;
switch ( choix )
switch ( choix )
{
{
case 1 :
case 1 :
// lancerAdmissions(tetudResp, nbCandidats, tetudAdmis, nbEtudAdmis, tetudAttente, nbEtudAttente, respVille, respDept);
menuAffichage ( tetudResp , nbCandidatsDept ) ;
break ;
break ;
case 2 :
case 2 :
m enuAffichage( tetudResp , nbCandidatsDept , tetudRespAdmis , nbCandidatsDeptAdmis , tetudRespAttente , nbCandidatsDeptAttente ) ;
m odificationNbPDeptResp( tiut , * nbIUT , respVille , respDept ) ;
break ;
break ;
case 3 :
case 3 :
modificationNbPDept ( tiut , * nbIUT ) ;
//*noteMin = modifNoteMin(noteMin);
break ;
// ? Note min stocké où ? ==> dans le fichier informationsIUT.txt
break ; //! A revoir segment fault
case 4 :
case 4 :
// modificationNoteMinDept(tiut, *nbIUT);
modifStatueCandidat ( tetudResp , nbCandidatsDept , noteMin , tiut , * nbIUT , respVille , respDept ) ; //! Mettre dans l'admin et dire que c'est lui qui lance tt
// lancerAdmissions(tetudResp, nbCandidats, tetudAdmis, nbEtudAdmis, tetudAttente, nbEtudAttente, respVille, respDept);
//! Qd finis enregistrer dans tblAdmis et tblAttente puis sauv dans fichier
statueCandidat ( tetud , nbCandidats , tetudAdmis , tetudAttente , nbEtudAdmis , nbEtudAttente ) ;
break ;
break ;
case 9 :
case 9 :
c = true ;
c = true ;
@ -319,10 +322,11 @@ void menuResponsable(Etudiant *tetud[], int nbCandidats, VilleIUT *tiut[], int *
* @ param tetudAttente Tableau des é tudiants en file d ' attente
* @ param tetudAttente Tableau des é tudiants en file d ' attente
* @ param nbEtudAttente Nombre d ' é tudiants en file d ' attente
* @ param nbEtudAttente Nombre d ' é tudiants en file d ' attente
*/
*/
void menuAffichage ( Etudiant * tetudResp [ ] , int nbCandidatsDept , Etudiant * tetudRespAdmis [ ] , int nbCandidatsDeptAdmis , Etudiant * tetudRespAttente [ ] , int nbCandidatsDeptAttente )
void menuAffichage ( Etudiant * tetudResp [ ] , int nbCandidatsDept )
{
{
int choix ;
int choix ;
bool c = false ;
bool c = false ;
int nbCandidatsDeptAdmis = 0 , nbCandidatsDeptAttente = 0 , nbCandidatsDeptRefuse = 0 ;
while ( c = = false )
while ( c = = false )
{
{
printf ( " \n \n Menu des Affichages Responsable de Departement : Que voulez-vous faire ? \n " ) ;
printf ( " \n \n Menu des Affichages Responsable de Departement : Que voulez-vous faire ? \n " ) ;
@ -331,7 +335,6 @@ void menuAffichage(Etudiant *tetudResp[], int nbCandidatsDept, Etudiant *tetudRe
printf ( " \t 3 - Afficher les candidats refusés du departement \n " ) ;
printf ( " \t 3 - Afficher les candidats refusés du departement \n " ) ;
printf ( " \t 4 - Afficher les candidats en attente du departement \n " ) ;
printf ( " \t 4 - Afficher les candidats en attente du departement \n " ) ;
printf ( " \t 5 - Afficher un seul candidat du departement \n " ) ;
printf ( " \t 5 - Afficher un seul candidat du departement \n " ) ;
printf ( " \t 6 - Afficher le statue d'un candidats du departement \n " ) ;
printf ( " \t 9 - Quitter \n " ) ;
printf ( " \t 9 - Quitter \n " ) ;
printf ( " \n Entrez votre choix : \n > " ) ;
printf ( " \n Entrez votre choix : \n > " ) ;
scanf ( " %d%*c " , & choix ) ;
scanf ( " %d%*c " , & choix ) ;
@ -342,23 +345,54 @@ void menuAffichage(Etudiant *tetudResp[], int nbCandidatsDept, Etudiant *tetudRe
printf ( " Il y a %d candidats dans votre departement. \n " , nbCandidatsDept ) ;
printf ( " Il y a %d candidats dans votre departement. \n " , nbCandidatsDept ) ;
break ;
break ;
case 2 :
case 2 :
nbCandidatsDeptAdmis = nbCandidatsAdmis ( tetudResp , nbCandidatsDept ) ;
afficherCandidatsAdmis ( tetudResp , nbCandidatsDept ) ;
afficherCandidatsAdmis ( tetudResp , nbCandidatsDept ) ;
printf ( " Il y a %d candidats admis dans votre departement. \n " , nbCandidatsDeptAdmis ) ; // ! A revoir nbr incorrect
printf ( " Il y a %d candidats admis dans votre departement. \n " , nbCandidatsDeptAdmis ) ;
break ;
break ;
case 3 :
case 3 :
nbCandidatsDeptRefuse = nbCandidatsRefuses ( tetudResp , nbCandidatsDept ) ;
afficherCandidatsRefuses ( tetudResp , nbCandidatsDept ) ;
afficherCandidatsRefuses ( tetudResp , nbCandidatsDept ) ;
printf ( " Il y a %d candidats refusés dans votre departement. \n " , ( nbCandidatsDept - ( nbCandidatsDeptAdmis + nbCandidatsDeptAttente ) ) ) ; // ! A revoir nbr incorrect
printf ( " Il y a %d candidats refusés dans votre departement. \n " , nbCandidatsDeptRefuse ) ;
break ;
break ;
case 4 :
case 4 :
nbCandidatsDeptAttente = nbCandidatsAttente ( tetudResp , nbCandidatsDept ) ;
afficherCandidatsAttente ( tetudResp , nbCandidatsDept ) ;
afficherCandidatsAttente ( tetudResp , nbCandidatsDept ) ;
printf ( " Il y a %d candidats en attente dans votre departement. \n " , nbCandidatsDeptAttente ) ; // ! A revoir nbr incorrect
printf ( " Il y a %d candidats en attente dans votre departement. \n " , nbCandidatsDeptAttente ) ;
break ;
break ;
case 5 :
case 5 :
afficherCandidat ( tetudResp , nbCandidatsDept ) ;
afficherCandidat ( tetudResp , nbCandidatsDept ) ;
break ;
break ;
// case 6:
case 9 :
// afficherStatutCandidat(tetudResp, nbCandidatsDept);
c = true ;
// break;
return ;
default :
printf ( " Option non reconnue. Veuillez recommencer. \n " ) ;
break ;
}
}
}
void menuPostCandidat ( )
{
int choix ;
bool c = false ;
while ( c = = false )
{
printf ( " \n \n Menu des Affichages Responsable de Departement : Que voulez-vous faire ? \n " ) ;
printf ( " \t 1 - Afficher les informations sur mes voeus \n " ) ;
printf ( " \t 2 - Validation d'un voeux (et refus des autres) \n " ) ;
printf ( " \t 9 - Quitter \n " ) ;
printf ( " \n Entrez votre choix : \n > " ) ;
scanf ( " %d%*c " , & choix ) ;
switch ( choix )
{
case 1 :
afficherCandidat ( tetud , * nbCandidats ) ;
break ;
case 2 :
ValidationCandidature ( ) ; //** Valide une candidature et rejette ttes les autres ==> enregistre dans tblAdmis et tblAttente
MiseAJourAdmission ( ) ; //** relance l'admission
break ;
case 9 :
case 9 :
c = true ;
c = true ;
return ;
return ;