@ -115,7 +115,7 @@ void titreMenuPrincipal(void) {
printf ( " ╚═╝ ╚═╝╚══════╝ ╚═════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═══╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ \ e[0m \n \n " ) ;
}
void menuCandidat ( VilleIUT * * * tiut Pointer , ListeCandidats * listePointer , int * nbVilles , int * nbCandidats ) {
void menuCandidat ( VilleIUT * * tiut , ListeCandidats * listePointer , int nbVilles , int * nbCandidats ) {
char poubelle ; // Permet de stocker les caractères aspirés en trop sur stdin lors du choix dans le menu
Candidat * candidat ;
// choix: Contient le choix de l'utilisateur dans le menu / id: contient id user si login / status: candidatures ouvertes ou fermées
@ -161,7 +161,7 @@ void menuCandidat(VilleIUT*** tiutPointer, ListeCandidats* listePointer, int* nb
case 1 :
//system("clear");
printf ( " Consulter les ville possédant un IUT... \n \n " ) ;
afficherListeVilles ( * tiut Pointer , * nbVilles ) ;
afficherListeVilles ( tiut , nbVilles ) ;
break ;
case 2 :
printf ( " Voir les disponibilités des départements dans un IUT... \n \n " ) ;
@ -173,7 +173,7 @@ void menuCandidat(VilleIUT*** tiutPointer, ListeCandidats* listePointer, int* nb
if ( strcasecmp ( searchIUT , " q " ) = = 0 )
break ;
afficherListeDepartement ( * tiut Pointer , * nbVilles , searchIUT ) ;
afficherListeDepartement ( tiut , nbVilles , searchIUT ) ;
break ;
case 3 :
printf ( " Rechercher un département... \n \n " ) ;
@ -185,13 +185,13 @@ void menuCandidat(VilleIUT*** tiutPointer, ListeCandidats* listePointer, int* nb
if ( strcasecmp ( searchDept , " q " ) = = 0 )
break ;
afficherDepartement ( * tiut Pointer , * nbVilles , searchDept ) ;
afficherDepartement ( tiut , nbVilles , searchDept ) ;
break ;
case 4 :
if ( id ! = 0 ) {
printf ( " Candidater... \n \n " ) ;
if ( status = = 1 )
menuCandidat_candidater ( * tiut Pointer , * nbVilles , candidat ) ;
menuCandidat_candidater ( tiut , nbVilles , candidat ) ;
else
fprintf ( stderr , " \ e[0;91mErreur : la phase de candidature est arrêtée. \n \ e[0m " ) ;
} else {
@ -243,7 +243,7 @@ void menuCandidat(VilleIUT*** tiutPointer, ListeCandidats* listePointer, int* nb
printf ( " \n Retour au menu principal... \n " ) ;
}
void menuResponsable ( VilleIUT * * * tiut Pointer , ListeCandidats * liste Pointer , int * nbVilles , int * nbCandidats ) {
void menuResponsable ( VilleIUT * * tiut , ListeCandidats liste , int nbVilles , int nbCandidats ) {
// poubelle: permet de stocker les caractères aspirés en trop sur stdin lors du choix dans le menu
// pass: contient la valeur entrée par l'utilisateur lors de la saisie du mot de passe
char poubelle , pass [ LEN_MAX ] ;
@ -278,6 +278,8 @@ void menuResponsable(VilleIUT*** tiutPointer, ListeCandidats* listePointer, int*
printf ( " -------------------------------------------------------------------------- \n " ) ;
printf ( " \t 1 - Lister les candidatures \n \n " ) ;
printf ( " \t 2 - Traiter les candidatures \n \n " ) ;
printf ( " \t 3 - Voir les candidats admis \n \n " ) ;
printf ( " \t 4 - Voir les candidats en file d'attente \n \n " ) ;
printf ( " \t 9 - Quitter \n " ) ;
printf ( " -------------------------------------------------------------------------- \n " ) ;
@ -291,19 +293,25 @@ void menuResponsable(VilleIUT*** tiutPointer, ListeCandidats* listePointer, int*
case 1 :
printf ( " Lister les candidatures... \n " ) ;
printf ( " \n \ e[3;32mLes deux prochaines lignes sont affichées à titre informatif \ e[0m \n \n " ) ;
printf ( " Entrez le nom de la ville que vous souhaitez traiter : Clermont-Ferrand \n " ) ;
printf ( " Quel département souhaitez-vous modifier ? : Informatique \n " ) ;
calculerNoteGlobale ( * listePointer , * nbCandidats ) ; // Calcul des notes globales avant affichage
calculerNoteGlobale ( liste , nbCandidats ) ; // Calcul des notes globales avant affichage
printf ( " \n \ e[1;32mAffichage des candidatures pour le département 'Informatique' de l'IUT 'Clermont-Ferrand' \n \n \ e[0m " ) ;
afficherCandidaturesByDept ( * liste Pointer , * nbCandidats , " Clermont-Ferrand " , " Informatique " ) ;
afficherCandidaturesByDept ( liste , nbCandidats , " Clermont-Ferrand " , " Informatique " ) ;
break ;
case 2 :
printf ( " Traiter les candidatures... \n " ) ;
menuResponsable_traiterCandidatures ( * tiutPointer , * nbVilles , * listePointer , * nbCandidats ) ;
menuResponsable_traiterCandidatures ( tiut , nbVilles , liste , nbCandidats ) ;
break ;
case 3 :
printf ( " Voir les candidats admis... \n " ) ;
printf ( " \n \ e[1;32mAffichage des candidats admis triés par ordre alphabétique pour le département 'Informatique' de l'IUT 'Clermont-Ferrand' \n \n \ e[0m " ) ;
afficherCandidatsAdmis ( " Informatique " , " Clermont-Ferrand " ) ;
break ;
case 4 :
printf ( " Voir les candidats en liste d'attente... " ) ;
break ;
default :
// Permet d'aspirer les caractères en trop sur stdin (évite de répéter le message d'erreur X fois)
@ -316,6 +324,8 @@ void menuResponsable(VilleIUT*** tiutPointer, ListeCandidats* listePointer, int*
printf ( " -------------------------------------------------------------------------- \n " ) ;
printf ( " \t 1 - Lister les candidatures \n \n " ) ;
printf ( " \t 2 - Traiter les candidatures \n \n " ) ;
printf ( " \t 3 - Voir les candidats admis \n \n " ) ;
printf ( " \t 4 - Voir les candidats en file d'attente \n \n " ) ;
printf ( " \t 9 - Quitter \n " ) ;
printf ( " -------------------------------------------------------------------------- \n " ) ;
@ -326,7 +336,7 @@ void menuResponsable(VilleIUT*** tiutPointer, ListeCandidats* listePointer, int*
printf ( " \n Retour au menu principal... \n " ) ;
}
void menuAdmin ( VilleIUT * * * tiutPointer , ListeCandidats * liste Pointer , int * nbVilles , int * nbCandidats ) {
void menuAdmin ( VilleIUT * * * tiutPointer , ListeCandidats liste , int * nbVilles , int nbCandidats ) {
// poubelle: Permet de stocker les caractères aspirés en trop sur stdin lors du choix dans le menu
// pass: contient la valeur entrée par l'utilisateur lors de la saisie du mot de passe
char poubelle , pass [ LEN_MAX ] ;
@ -400,7 +410,7 @@ void menuAdmin(VilleIUT*** tiutPointer, ListeCandidats* listePointer, int* nbVil
case 7 :
printf ( " Liste des candidats... \n " ) ;
printf ( " \n \ e[4;37mListe des candidats (triés par ordre alphabétique) : \ e[0m \n \n " ) ;
afficherListeCandidats ( * liste Pointer , * nbCandidats ) ;
afficherListeCandidats ( liste , nbCandidats ) ;
break ;
default :
// Permet d'aspirer les caractères en trop sur stdin (évite de répéter le message d'erreur X fois)
@ -470,7 +480,7 @@ void menuPrincipal(/* TODO: prise en compte des status actuels du recrutement */
printf ( " ╚██████╗██║ ██║██║ ╚████║██████╔╝██║██████╔╝██║ ██║ ██║ \n " ) ;
printf ( " ╚═════╝╚═╝ ╚═╝╚═╝ ╚═══╝╚═════╝ ╚═╝╚═════╝ ╚═╝ ╚═╝ ╚═╝ \ e[0m \n \n " ) ;
menuCandidat ( & tiut , & liste , & nbVilles , & nbCandidats ) ;
menuCandidat ( tiut , & liste , nbVilles , & nbCandidats ) ;
titreMenuPrincipal ( ) ;
break ;
case 2 :
@ -482,7 +492,7 @@ void menuPrincipal(/* TODO: prise en compte des status actuels du recrutement */
printf ( " ██║ ██║██████╔╝██║ ╚═╝ ██║██║██║ ╚████║██║███████║ ██║ ██║ ██║██║ ██║ ██║ ███████╗╚██████╔╝██║ ██║ \n " ) ;
printf ( " ╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚══════╝ ╚═════╝ ╚═╝ ╚═╝ \ e[0m \n \n " ) ;
menuAdmin ( & tiut , & liste , & nbVilles , & nbCandidats ) ;
menuAdmin ( & tiut , liste , & nbVilles , nbCandidats ) ;
status = readStatus ( ) ;
titreMenuPrincipal ( ) ;
break ;
@ -496,7 +506,7 @@ void menuPrincipal(/* TODO: prise en compte des status actuels du recrutement */
printf ( " ██║ ██║███████╗███████║██║ ╚██████╔╝██║ ╚████║███████║██║ ██║██████╔╝███████╗███████╗ \n " ) ;
printf ( " ╚═╝ ╚═╝╚══════╝╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═══╝╚══════╝╚═╝ ╚═╝╚═════╝ ╚══════╝╚══════╝ \ e[0m \n \n " ) ;
menuResponsable ( & tiut , & liste , & nbVilles , & nbCandidats ) ;
menuResponsable ( tiut , liste , nbVilles , nbCandidats ) ;
titreMenuPrincipal ( ) ;
} else
fprintf ( stderr , " \ e[0;91mErreur : les recrutements sont en cours, impossible d'accéder au menu responsable. Merci de réessayer plus tard. \n \n \ e[0m " ) ;