diff --git a/src/I/un.c b/src/I/un.c index ac0ad01..33410c1 100644 --- a/src/I/un.c +++ b/src/I/un.c @@ -459,55 +459,6 @@ void menuPrincipal(/* TODO: prise en compte des status actuels du recrutement */ // FONCTIONS MENU CANDIDAT -void menuCandidat_candidater(VilleIUT** tiut, int nbVilles, Candidat* candidat) { - Candidature* candid = creerCandidature(); - - char searchIUT[LEN_MAX], searchDept[LEN_MAX]; - printf("Entrez la ville dans laquelle vous souhaitez candidater : "); - scanf("%s", searchIUT); - - if(strcasecmp(searchIUT, "q") == 0) - return; - - int i = rechercherVille(tiut, nbVilles, searchIUT); - - if(i == -1) { - fprintf(stderr, "\e[1;91mErreur: la ville '%s' n'est pas dans la liste des IUT.\e[0m\n\n", searchIUT); - return; - } - - printf("Entrez le département dans lequel vous souhaitez candidater : "); - scanf("%*c%[^\n]", searchDept); - - int found = 0; - ListeDept liste = tiut[i]->ldept; - - if(strcmp(liste->departement, searchDept) == 0) - found=1; - - while(liste->suiv != NULL) { - liste = liste->suiv; - if(strcmp(liste->departement, searchDept) == 0) - found=1; - } - - if(found == 0) { - fprintf(stderr, "\e[1;91mErreur: le département '%s' n'existe pas dans l'IUT '%s'.\e[0m\n\n", searchDept, searchIUT); - return; - } - - strcpy(candid->ville, searchIUT); - strcpy(candid->departement, searchDept); - - if(checkCandidature(candidat, *candid) == -1) { - fprintf(stderr, "\n\e[1;91mErreur: vous avez déjà candidaté pour le département '%s' dans l'IUT '%s'.\e[0m\n\n", searchDept, searchIUT); - return; - } - - ajouterCandidature(candidat, candid); - - printf("\n\e[1;32mVotre candidature au département '%s' à l'IUT '%s' a bien été prise en compte !\e[0m\n\n", searchDept, searchIUT); -} void menuAdmin_modifierPlaces(VilleIUT** tiut, int nbVilles) { int nbPlaces;