<?php
// Sélection du niveau :
if($deb_diveval=="6")
{ $div = "6"; }
else if($deb_diveval=="5")
{ $div = "5"; }
else if($deb_diveval=="4")
{ $div = "4"; }
else if($deb_diveval=="3")
{ $div = "3"; }
else if($deb_diveval=="2")
{ $div = "2"; }
else if($deb_diveval=="1")
{ $div = "1"; }
else { $div = "t"; }

// Récupération du nombre de degrés d'évaluation
$degres = mysqli_query($bdd,"SELECT valeur FROM ".$prefix."_parametres WHERE param_nom = 'eval_degres'");
$degres_info = mysqli_fetch_assoc($degres);
$nb_degres = $degres_info['valeur'];
if($nb_degres==4) {
	$value = array('0','1','2','3','4');
	$evalv = array(NIV0,NIV1,NIV2,NIV3,NIV4);
}
else {
	$value = array('0','1','2','4');
	$evalv = array(NIV0,NIV1,NIV2,NIV4);
}

// Sélection des grilles d'évaluation :
$verif_param_sav = mysqli_query($bdd,"SELECT valeur FROM ".$prefix."_parametres WHERE param_nom = 'savoirs'");
$verif_param_sav_info = mysqli_fetch_array($verif_param_sav);
$choixgrille = $verif_param_sav_info['valeur'];
if($choixgrille == "A1E0P0")
{
	$savchoix = "WHERE sav.s".$div."_id LIKE 'APD%' ";
}
else if($choixgrille == "A1E1P0")
{
	$savchoix = "WHERE (sav.s".$div."_id LIKE 'APD%' OR sav.s".$div."_id LIKE 'EMI%') ";
}
else if($choixgrille == "A1E1P1")
{
	$savchoix = "";
	$savchoix_alt = "WHERE (sav.s".$div."_id LIKE 'APD%' OR sav.s".$div."_id LIKE 'EMI%') ";
}
else if($choixgrille == "A1E0P1")
{
	$savchoix = "WHERE (sav.s".$div."_id LIKE 'APD%' OR sav.s".$div."_id LIKE 'PER%') ";
	$savchoix_alt = "WHERE sav.s".$div."_id LIKE 'APD%' ";
}
else if($choixgrille == "A0E1P0")
{
	$savchoix = "WHERE sav.s".$div."_id LIKE 'EMI%' ";
}
else if($choixgrille == "A0E1P1")
{
	$savchoix = "WHERE (sav.s".$div."_id LIKE 'EMI%' OR sav.s".$div."_id LIKE 'PER%') ";
	$savchoix_alt = "WHERE sav.s".$div."_id LIKE 'EMI%' ";
}
else if($choixgrille == "A0E0P1")
{
	$savchoix = "WHERE sav.s".$div."_id LIKE 'PER%' ";
}
?>
