Commit 2d32325f authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

Ajout du libellé de la question dans l'export brut

parent 3baea7ae
Loading
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -353,8 +353,8 @@ $nbElements = count($elements);
    $brut = [];
    $header = ["Ligne", "Id"];
    foreach ($enquete->getQuestions() as $question) {
        if ($question->hasNote()) $header[] = 'evaluation_' . $question->getId();
        if ($question->hasCommentaire()) $header[] = 'commentaire_' . $question->getId();
        if ($question->hasNote()) $header[] = 'evaluation [' . $question->getLibelle() .']';
        if ($question->hasCommentaire()) $header[] = 'commentaire [' . $question->getLibelle() . ']';
    }
    foreach ($elements as $element) {
        $data = [];
@@ -420,7 +420,6 @@ $nbElements = count($elements);

    $('span.export#participation').on('click', function () {
        let question_id = $(this).data("questionId");
        alert(question_id);
        let header = {0: "Valeur", 1: "Occurence", 2: "Ratio"};
        let tableau = participations[question_id];
        downloadCSVFromJson('enquete_participations_' + $(this).attr('id') + '_' + Date.now().toString() + '.csv', header, tableau);