Skip to content

Commit

Permalink
Correction bug #262 à correcteur affiché quand l'élève prend un autre…
Browse files Browse the repository at this point in the history
… correcteur au second cours
  • Loading branch information
meunx committed Aug 28, 2016
1 parent fcf2a78 commit 046035d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions db.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,9 @@ function simplaVorto($valuo,$tabelo,$kie) {
echo getSimplaVorto($valuo,$tabelo,$kie);
}

function getKorektantonElLernanto($lernanto_id) {
function getKorektantonElLernanto($lernanto_id,$lernanto_kurso) {
global $bdd;
$demando = "SELECT personnomo,familinomo,retadreso FROM nuna_kurso join personoj on personoj.id = nuna_kurso.korektanto WHERE studanto = ".$lernanto_id;
$demando = "SELECT personnomo,familinomo,retadreso FROM nuna_kurso join personoj on personoj.id = nuna_kurso.korektanto WHERE studanto = ".$lernanto_id." AND nuna_kurso.kurso = '".$lernanto_kurso."'";
$result = $bdd->query($demando) or die(print_r($bdd->errorInfo()));
$row = $result->fetch();
return $row;
Expand Down
2 changes: 1 addition & 1 deletion personinformoj.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@

<p><span class="primaire-texte texte-moyen">Dernier cours choisi : </span><?php simplaVorto("nomo","kursoj"," where kodo='".$persono['kurso']."'"); ?></p>
<p><span class="primaire-texte texte-moyen">Mon correcteur est :</span><br>
<?php $korektanto = getKorektantonElLernanto($persono['id']); echo $korektanto['personnomo']." ".$korektanto['familinomo']; ?>
<?php $korektanto = getKorektantonElLernanto($persono['id'],$persono['kurso']); echo $korektanto['personnomo']." ".$korektanto['familinomo']; ?>
(<a href="mailto:<?php echo $korektanto['retadreso'];?>"><?php echo $korektanto['retadreso'];?></a>)</p>
<h5>Cours suivis :</h5>
<?php getCoursElLernanto($persono['id']);?>
Expand Down

0 comments on commit 046035d

Please sign in to comment.