Skip to content

Commit

Permalink
Correction suppression EPI + affichage
Browse files Browse the repository at this point in the history
  • Loading branch information
Regis85 committed Nov 21, 2016
1 parent 8bca442 commit 2df864b
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 66 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
secure/*
!secure/modeles/

/lib/simplesaml/config/config.php

# Ignore paths that contain user-generated content.
/backup
!/backup/donnees_test
Expand Down
3 changes: 2 additions & 1 deletion lib/simplesaml/config-templates/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,8 @@
* Example:
* 'proxy' => 'tcp://proxy.example.com:5100'
*/
'proxy' => NULL,
//'proxy' => NULL,
'proxy'=>'tcp://10.185.36.222:3128',

/*
* Array of URL's to allow a trusted redirect to.
Expand Down
3 changes: 2 additions & 1 deletion lib/simplesaml/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,8 @@
* Example:
* 'proxy' => 'tcp://proxy.example.com:5100'
*/
'proxy' => NULL,
//'proxy' => NULL,
'proxy'=>'tcp://10.185.36.222:3128',

/*
* Array of URL's to allow a trusted redirect to.
Expand Down
3 changes: 2 additions & 1 deletion lib/simplesaml/config/modeles/config-modele.php
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,8 @@
* Example:
* 'proxy' => 'tcp://proxy.example.com:5100'
*/
'proxy' => NULL,
//'proxy' => NULL,
'proxy'=>'tcp://10.185.36.222:3128',

/*
* Array of URL's to allow a trusted redirect to.
Expand Down
46 changes: 13 additions & 33 deletions mod_LSUN/administrateur.php
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,9 @@
</div>
<div>
Disciplines :
<?php foreach ($tableauMatieresEPI as $matiereEPI) {
echo getMatiereOnMatiere($matiereEPI['matiere'])->nom_complet;
if ($matiereEPI['modalite'] =="O") { echo " option obligatoire"; } elseif ($matiereEPI['modalite'] =="F") {echo " option facultative";}
<?php foreach ($tableauMatieresEPI as $matEPI) {
echo getMatiereOnMatiere($matEPI['matiere'])->nom_complet;
if ($matEPI['modalite'] =="O") { echo " option obligatoire"; } elseif ($matEPI['modalite'] =="F") {echo " option facultative";}
echo " - ";
} ?>
<select multiple name="modifieEpiMatiere<?php echo $epiCommun->id; ?>[]">
Expand Down Expand Up @@ -345,17 +345,9 @@

} else {
$enseignements = getCoursById($liaison->id_enseignements);
//var_dump($enseignements);
// echo '<br>';
// echo '<br>';
// echo '<br>';
$enseignements->data_seek(0);
$lastClasse = NULL;
while ($enseignement = $enseignements->fetch_object()) {
// echo '<br>';
// echo '<br>';
// echo '<br>';
// var_dump($enseignement);
if ($lastClasse != $enseignement->id_groupe) {
echo $enseignement->id_matiere."";
} else {
Expand Down Expand Up @@ -431,18 +423,9 @@
?>
</div>
<div>
Action :
<input type="submit" class="btnSupprime"
alt="Boutton supprimer"
name="supprimeEpi"
value="<?php echo $epiCommun->id; ?>"
title="Supprimer cet EPI" />
/
<input type="submit" class="btnValide"
alt="Submit button"
name="modifieEpi"
value="<?php echo $epiCommun->id; ?>"
title="Modifier cet EPI" />
<button type="submit" name="supprimeEpi" value="<?php echo $epiCommun->id; ?>" ><img src='../images/disabled.png' style="width: 16px;" /> Supprimer cet EPI</button>
<button type="submit" name="modifieEpi" value="<?php echo $epiCommun->id; ?>" ><img src='../images/enabled.png' />Modifier cet EPI</button>
<button type="submit" name="creeAidEpi" value="<?php echo $epiCommun->id; ?>" disabled ><img src='../images/icons/copy-16.png' /> Créer un AID pour cet EPI</button>
</div>
</div>
<?php } ?>
Expand Down Expand Up @@ -506,12 +489,7 @@
</p>
<div>
<p>
Action
<input type="submit" class="btnValide"
alt="Submit button"
name="ajouteEPI"
value="y"
title="Ajouter cet EPI" />
<button type="submit" name="ajouteEPI" value="y" ><img src='../images/enabled.png' />Ajouter cet EPI</button>
</p>
</div>
</div>
Expand Down Expand Up @@ -596,9 +574,11 @@
</select>

<p>
<button name="modifierAp" value="<?php echo $ap->id; ?>" id="modifierAp_<?php echo $ap->id; ?>" title="Enregistrer les modifications pour cet Accompagnement Personnalisé" >Modifier</button>
<button name="supprimerAp" value="<?php echo $ap->id; ?>" id="supprimeAp_<?php echo $ap->id; ?>" title="Supprimer cet Accompagnement Personnalisé" >Supprimer</button>
</p>
<button type="submit" name="supprimerAp" value="<?php echo $ap->id; ?>" id="supprimeAp_<?php echo $ap->id; ?>" title="Supprimer cet Accompagnement Personnalisé" ><img src='../images/disabled.png' style="width: 16px;" /> Supprimer</button>
<button type="submit" name="modifierAp" value="<?php echo $ap->id; ?>" id="modifierAp_<?php echo $ap->id; ?>" title="Enregistrer les modifications pour cet Accompagnement Personnalisé" ><img src='../images/enabled.png' /> Modifier</button>
<button type="submit" name="creeAidAp" value="<?php echo $ap->id; ?>" disabled ><img src='../images/icons/copy-16.png' /> Créer un AID pour cet AP</button>

</p>

</div>
<?php
Expand Down Expand Up @@ -646,7 +626,7 @@
</select>
</p>
<p>
<button type="submit" name="creeAP" value="y">Créer cet AP</button>
<button type="submit" name="creeAP" value="y"><img src='../images/enabled.png' /> Créer cet AP</button>
</p>

</div>
Expand Down
41 changes: 16 additions & 25 deletions mod_LSUN/creeFichier.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,31 +38,22 @@

// active la gestion d'erreur personnalisée
//libxml_use_internal_errors(true);

?>
<div class="lsun_cadre">
<?php
// Validation du document XML
/*
$validate = $dom->schemaValidate($schema) ?
"<p class='center grand vert'>Le schéma XML paraît valide !</p>" :
"<p class='center grand rouge'>Schéma XML non valide !</p>";
*
*/

/*
if (!$xml->schemaValidate($schema)) { ?>
<p class='center grand rouge'>Validation du schema d'export → Votre fichier <?php echo $dirTemp.$nomFichier; ?> n'est pas valide</p>
<?php //libxml_display_errors();
/*
$errors = libxml_get_errors();
foreach ($errors as $error) {
echo display_xml_error($error);
}
$dom = new DOMDocument;
$dom->Load($file);

$validate = $dom->schemaValidate($schema);
if ($validate) {
echo "<p class='vert'>Le fichier $nomFichier semble valide !</p>\n";
} else {
?>
<p class ="rouge">Le fichier <?php echo $nomFichier; ?> n'est pas valide, vous devez le vérifier et corriger les erreurs.</p>
<p>Vous pouvez récupérer le schéma du fichier pour votre validateur en <a href="<?php echo $schema; ?>" target="_BLANK">cliquant ici</a></p>
<?php
}
*
*/


unset($xml);
// Affichage du résultat
Expand All @@ -74,7 +65,7 @@
</a>
(<em>effectuer un clic-droit/enregistrer la cible [vous pouvez supprimer le 1 de l'extension]</em>)
</p>
<p class='rouge'>Vous pouvez vérifier votre fichier sur <a href=www.xmlvalidation.com/index.php">xmlvalidation.com</a></p>

<p class='rouge'>Vous pouvez vérifier votre fichier sur <a href="http://www.xmlvalidation.com/index.php" target="_blank">xmlvalidation.com</a></p>

</div>

1 change: 0 additions & 1 deletion mod_LSUN/lib/fonctions.php
Original file line number Diff line number Diff line change
Expand Up @@ -511,4 +511,3 @@ function display_xml_error($error) {
}



8 changes: 5 additions & 3 deletions mod_LSUN/lib/fonctions_EPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function sauveEPI($newEpiPeriode, $newEpiClasse, $newEpiCode, $newEpiIntitule, $
$matiere = substr($valeur, 0, -1);
$modalite = substr($valeur, -1);
$sqlCreLienEPI = "INSERT INTO lsun_j_epi_matieres (id_matiere, modalite, id_epi) VALUES ('$matiere', '$modalite' , $idEPI) ON DUPLICATE KEY UPDATE id_matiere = '$matiere' , modalite = '$modalite' ";
//echo $sqlCreLienEPI;
echo $sqlCreLienEPI;
$mysqli->query($sqlCreLienEPI);
}
}
Expand Down Expand Up @@ -160,7 +160,9 @@ function supprimeEPI($EpiId) {
delMatiereEPI($EpiId);
delClasseEPI($EpiId);
delClasseEPI($EpiId);
lsun_j_epi_enseignements($EpiId);
//delLsun_j_epi_enseignements($EpiId);
//$sqlDelEpiEns = "DELETE FROM lsun_j_epi_enseignements WHERE id_epi = '$EpiId'; ";
//$mysqli->query($sqlDelEpiEns);
$sqlDeleteEpi = "DELETE FROM lsun_epi_communs WHERE id = '$EpiId' ";
$mysqli->query($sqlDeleteEpi);
//echo $sqlDeleteEpi.'<br>';
Expand Down Expand Up @@ -230,7 +232,7 @@ function lieEpiCours($id_epi , $id_enseignement , $aid, $id=NULL) {
$sqLieEpiCours .= "NULL";
}
$sqLieEpiCours .= ",$id_epi , $id_enseignement , $aid)";
//echo $sqLieEpiCours;
echo $sqLieEpiCours;
$mysqli->query($sqLieEpiCours);
}

Expand Down
2 changes: 1 addition & 1 deletion mod_LSUN/lib/requetes_tables.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

$sql = "CREATE TABLE IF NOT EXISTS lsun_j_epi_matieres ("
. "id int(11) NOT NULL auto_increment COMMENT 'identifiant unique', "
. "id_matiere int(11) NOT NULL COMMENT 'id de la matiere' , "
. "id_matiere varchar(50) NOT NULL COMMENT 'id de la matiere' , "
. "modalite varchar(1) COMMENT \"modalite d'élection de la matiere\" , "
. "id_epi int(11) NOT NULL COMMENT \"id de l'epi\", "
. "PRIMARY KEY (id) , UNIQUE KEY couple (id_matiere , id_epi) ) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_general_ci; ";
Expand Down
1 change: 1 addition & 0 deletions mod_LSUN/requetes/requetesAdministrateur.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@
$id_enseignement = $tableauModifieEpiLiaison[1];
$id_epi = $modifieEPI;
//$modifieEpiLiaison[][num] = $tableauModifieEpiLiaison[1];
echo $id_enseignement."<br>";
lieEpiCours($id_epi , $id_enseignement , $aid);
}
}
Expand Down

0 comments on commit 2df864b

Please sign in to comment.