diff --git a/manager/database.php b/manager/database.php
index 191f74c..3f8be06 100755
--- a/manager/database.php
+++ b/manager/database.php
@@ -125,23 +125,16 @@ class DataBase{
*/
public static function setMCC($semestre, $mcc){
-
foreach($mcc as $ue){
+ $mcc_ue = ueRepo::forMCC($semestre, $ue->nom, $ue->libelle, $ue->coefficient);
- $mcc_ue = ueRepo::forMCC($semestre, $ue['nom'], $ue['libelle'], $ue['coefficient']);
- foreach($ue['modules'] as $module){
+ foreach($ue->modules as $module){
+ $mcc_module = moduleRepo::forMCC($mcc_ue, $module->nom, $module->libelle, $module->coefficient);
- $mcc_module = moduleRepo::forMCC($mcc_ue, $module['nom'], $module['libelle'], $module['coefficient']);
- // echo '  '.$module['nom'].'
';
- foreach($module['controles'] as $controle){
-
- $controle_uid = controleRepo::forMCC($mcc_module, $controle['nom'], $controle['libelle'], $controle['coefficient']);
- // var_dump( $controle_uid );
- // echo '    '.$controle['nom'].'
';
-
- }
+ foreach($module->controles as $controle)
+ $controle_uid = controleRepo::forMCC($mcc_module, $controle->nom, $controle->libelle, $controle->coefficient);
}
diff --git a/manager/repo/controle.php b/manager/repo/controle.php
index c63f549..99a5d9a 100755
--- a/manager/repo/controle.php
+++ b/manager/repo/controle.php
@@ -165,7 +165,6 @@ class controleRepo extends DBAccess{
/* [1] SI LE CONTRÔLE N'EXISTE PAS => ON LE CRÉÉ
=====================================================*/
- echo "$mcc_module|$nom|$libelle|$coefficient
";
$creerControle = DataBase::getPDO()->prepare("INSERT INTO controle(id_controle, id_mcc_module, nom, libelle, base, coefficient, date_publication)
VALUES(DEFAULT, :mcc_module, :nom, :libelle, 20, :coefficient, NOW())");
$creerControle->execute(array( ':mcc_module' => $mcc_module, ':nom' => $nom, ':libelle' => $libelle, ':coefficient' => $coefficient ));