@ -48,6 +48,20 @@ void menu(VilleIUT *tiut[], int *nbIUT, Etudiant *tetud[], int *nbCandidats, boo
switch ( choix )
{
case 1 :
char mdp [ 30 ] , MdPAdmin [ 30 ] ;
int i = 0 ;
strcpy ( MdPAdmin , chargerMdPAdmin ( ) ) ;
printf ( " Veuillez entrer le mot de passe administrateur : \n > " ) ;
while ( mdp ! = MdPAdmin )
{
if ( i = = 3 )
{
printf ( " Vous avez entré 3 fois le mauvais mot de passe, veuillez réessayer plus tard. \n " ) ;
}
printf ( " Veuillez entrer le mot de passe administrateur : \n > " ) ;
scanf ( " %s%*c " , mdp ) ;
i + + ;
}
menuAdministrateur ( tiut , nbIUT , tetud , nbCandidats , phaseCandidatures , phaseTraitement ) ;
break ;
case 2 :
@ -64,9 +78,9 @@ void menu(VilleIUT *tiut[], int *nbIUT, Etudiant *tetud[], int *nbCandidats, boo
case 4 :
menuResponsable ( tetud , * nbCandidats , tiut , nbIUT , tetudAdmis , * nbEtudAdmis , tetudAttente , * nbEtudAttente ) ;
break ;
case 5 :
menuPostCandidat ( ) ;
break ;
// case 5:
// menuPostCandidat();
// break;
case 9 :
c = true ;
return ;
@ -289,16 +303,16 @@ void menuResponsable(Etudiant *tetud[], int nbCandidats, VilleIUT *tiut[], int *
case 2 :
modificationNbPDeptResp ( tiut , * nbIUT , respVille , respDept ) ;
break ;
case 3 :
//*noteMin = modifNoteMin(noteMin);
// ? Note min stocké où ? ==> dans le fichier informationsIUT.txt
break ; //! A revoir segment fault
case 4 :
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 ;
// case 3:
// //*noteMin = modifNoteMin(noteMin);
// // ? Note min stocké où ? ==> dans le fichier informationsIUT.txt
// break; //! A revoir segment fault
// case 4:
// 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;
case 9 :
c = true ;
return ;
@ -372,33 +386,33 @@ void menuAffichage(Etudiant *tetudResp[], int nbCandidatsDept)
}
}
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 :
c = true ;
return ;
default :
printf ( " Option non reconnue. Veuillez recommencer. \n " ) ;
break ;
}
}
}
// void menuPostCandidat()
// {
// int choix;
// bool c = false;
// while (c == false)
// {
// printf("\n\nMenu des Affichages Responsable de Departement : Que voulez-vous faire ?\n");
// printf("\t1 - Afficher les informations sur mes voeus\n");
// printf("\t 2 - Validation d'un voeux (et refus des autres)\n");
// printf("\t9 - Quitter\n");
// printf("\nEntrez 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:
// c = true;
// return;
// default:
// printf("Option non reconnue. Veuillez recommencer.\n");
// break;
// }
// }
// }