|
|
|
@ -303,13 +303,87 @@ int modifNbPlaces(int nbPlaces)
|
|
|
|
|
return nbPlaces;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int ajouterCandidat(Candidat *tiut[])
|
|
|
|
|
/*int ajouterCandidat(Etudiant *tiut[])
|
|
|
|
|
{
|
|
|
|
|
Candidat cand;
|
|
|
|
|
Etudiant cand;
|
|
|
|
|
printf("Entrez votre nom et votre prénom :\n> ");
|
|
|
|
|
scanf("%s%s", cand.nom, cand.prenom)
|
|
|
|
|
scanf("%s%s", cand.nom, cand.prenom);
|
|
|
|
|
printf("Entrez vos notes en : mathématiques, français, anglais et en spécialité :\n> ");
|
|
|
|
|
scanf("%f%f%f%f", cand.tabNotes[0], cand.tabNotes[1], cand.tabNotes[2], cand.tabNotes[3]);
|
|
|
|
|
printf("Entrez votre nombre de choix : ");
|
|
|
|
|
scanf("%d", cand.nbChoix)
|
|
|
|
|
}*/
|
|
|
|
|
|
|
|
|
|
void ajouterCandidature(Etudiant *tetud[], int nbCandidats, VilleIUT *tiut[], int nbVillesIUT)
|
|
|
|
|
{
|
|
|
|
|
int num, posCand, posVille;
|
|
|
|
|
char ville[30], dept[30];
|
|
|
|
|
bool trouve;
|
|
|
|
|
Choix c;
|
|
|
|
|
//! AUTHENTIFICATION
|
|
|
|
|
printf("Entrez votre numéro de candidat :\n> ");
|
|
|
|
|
scanf("%d", &num);
|
|
|
|
|
posCand = rechercheCandidat(tetud, nbCandidats, num, &trouve);
|
|
|
|
|
if (!trouve)
|
|
|
|
|
{
|
|
|
|
|
printf("Numéro de candidat non trouvé.");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
printf("Entrez la ville du département que vous souhaitez ajouter :\n> ");
|
|
|
|
|
scanf("%s", ville);
|
|
|
|
|
posVille = rechercheVille(tiut, nbVillesIUT, ville, &trouve);
|
|
|
|
|
if (!trouve)
|
|
|
|
|
{
|
|
|
|
|
printf("Ville non trouvée.");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
printf("Entrez le département que vous souhaitez ajouter :\n> ");
|
|
|
|
|
scanf("%s", dept);
|
|
|
|
|
rechercheDept(tiut[posVille]->ldept, dept, &trouve);
|
|
|
|
|
if (!trouve)
|
|
|
|
|
{
|
|
|
|
|
printf("Département non trouvé.");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
strcpy(c.ville, ville);
|
|
|
|
|
strcpy(c.departement, dept);
|
|
|
|
|
c.decisionAdmission = 0;
|
|
|
|
|
c.decisionCandidat = 0;
|
|
|
|
|
tetud[posCand]->lChoix = insererChoix(tetud[posCand]->lChoix, c);
|
|
|
|
|
tetud[posCand]->nbChoix++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void supprimerCandidature(Etudiant *tetud[], int nbCandidats)
|
|
|
|
|
{
|
|
|
|
|
int num, posCand, posVille;
|
|
|
|
|
char ville[30], dept[30];
|
|
|
|
|
bool trouve;
|
|
|
|
|
Choix c;
|
|
|
|
|
//! AUTHENTIFICATION
|
|
|
|
|
printf("Entrez votre numéro de candidat :\n> ");
|
|
|
|
|
scanf("%d", &num);
|
|
|
|
|
posCand = rechercheCandidat(tetud, nbCandidats, num, &trouve);
|
|
|
|
|
if (!trouve)
|
|
|
|
|
{
|
|
|
|
|
printf("Numéro de candidat non trouvé.");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
printf("Entrez la ville du département que vous souhaitez supprimer :\n> ");
|
|
|
|
|
scanf("%s", c.ville);
|
|
|
|
|
printf("Entrez le département que vous souhaitez supprimer :\n> ");
|
|
|
|
|
scanf("%s", c.departement);
|
|
|
|
|
trouve = rechercheChoix(tetud[posCand]->lChoix, c);
|
|
|
|
|
if (!trouve)
|
|
|
|
|
{
|
|
|
|
|
printf("Choix non trouvé.");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
tetud[posCand]->lChoix = supprimerChoix(tetud[posCand]->lChoix, c);
|
|
|
|
|
tetud[posCand]->nbChoix--;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ? Comment definir la note sur 20 mise lors de l'etude du dossier ?
|
|
|
|
|
// ? Ajouter une variable dans la structure Admission ?
|
|
|
|
|
// ? Ou mettre la liste et la note dans un tableau ?
|
|
|
|
|