예제 #1
0
function referentiel_get_nom_etablissement($id)
{
    global $DB;
    if (!empty($id)) {
        $record = $DB->get_record("referentiel_etablissement", array("id" => "{$id}"));
        if ($record) {
            return referentiel_nom_connu($record->nom_etablissement);
        }
    }
    return "";
}
예제 #2
0
            // print_object($records_etudiants);
            $nom_etablissement = referentiel_get_nom_etablissement($etudiant->ref_etablissement);
            if ($ligne % 2 == 0) {
                $bgcolor = $bgc0;
            } else {
                $bgcolor = $bgc1;
            }
            $etudiant_data .= '<tr valign="top" bgcolor="' . $bgcolor . '">' . "\n";
            $etudiant_data .= '<td><i>' . $etudiant->id . '</i></td>';
            $etudiant_data .= '<td><i>' . $etudiant->lastname . '</i></td>';
            $etudiant_data .= '<td>' . $etudiant->firstname . '</td>';
            $etudiant_data .= '<td>' . $etudiant->email . '</td>';
            $etudiant_data .= '<td>' . referentiel_nom_connu($etudiant->num_etudiant) . '</td>';
            $etudiant_data .= '<td>' . referentiel_nom_connu($etudiant->ddn_etudiant) . '</td>';
            $etudiant_data .= '<td>' . referentiel_nom_connu($etudiant->lieu_naissance) . '</td>';
            $etudiant_data .= '<td>' . referentiel_nom_connu($etudiant->departement_naissance) . '</td>';
            $etudiant_data .= '<td>' . $nom_etablissement . '</td>';
            $etudiant_data .= '</tr>';
            $ligne++;
        }
        $etudiant_data .= '</table>' . "\n";
    }
    $table->data[] = array($strselection, $etudiant_data);
}
if ($msg) {
    echo $OUTPUT->box_start('generalbox boxwidthwide boxaligncenter centerpara');
    echo $msg;
    echo $OUTPUT->box_end();
}
// Print it.
echo html_writer::table($table);