Import MCC fonctionnel et opé
This commit is contained in:
parent
12128eb5a5
commit
bb0088e09f
|
@ -125,23 +125,16 @@ class DataBase{
|
||||||
*/
|
*/
|
||||||
public static function setMCC($semestre, $mcc){
|
public static function setMCC($semestre, $mcc){
|
||||||
|
|
||||||
|
|
||||||
foreach($mcc as $ue){
|
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'].'<br>';
|
|
||||||
|
|
||||||
foreach($module['controles'] as $controle){
|
foreach($module->controles as $controle)
|
||||||
|
$controle_uid = controleRepo::forMCC($mcc_module, $controle->nom, $controle->libelle, $controle->coefficient);
|
||||||
$controle_uid = controleRepo::forMCC($mcc_module, $controle['nom'], $controle['libelle'], $controle['coefficient']);
|
|
||||||
// var_dump( $controle_uid );
|
|
||||||
// echo '    '.$controle['nom'].'<br>';
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -165,7 +165,6 @@ class controleRepo extends DBAccess{
|
||||||
|
|
||||||
/* [1] SI LE CONTRÔLE N'EXISTE PAS => ON LE CRÉÉ
|
/* [1] SI LE CONTRÔLE N'EXISTE PAS => ON LE CRÉÉ
|
||||||
=====================================================*/
|
=====================================================*/
|
||||||
echo "$mcc_module|$nom|$libelle|$coefficient<br>";
|
|
||||||
$creerControle = DataBase::getPDO()->prepare("INSERT INTO controle(id_controle, id_mcc_module, nom, libelle, base, coefficient, date_publication)
|
$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())");
|
VALUES(DEFAULT, :mcc_module, :nom, :libelle, 20, :coefficient, NOW())");
|
||||||
$creerControle->execute(array( ':mcc_module' => $mcc_module, ':nom' => $nom, ':libelle' => $libelle, ':coefficient' => $coefficient ));
|
$creerControle->execute(array( ':mcc_module' => $mcc_module, ':nom' => $nom, ':libelle' => $libelle, ':coefficient' => $coefficient ));
|
||||||
|
|
Loading…
Reference in New Issue