function view_question($q) { $rep = get_question_reponses($q->id_question); echo '<table>'; echo '<thead>'; echo '<th>'; echo '<td><span>' . $q->num . '</span><span>' . $s->libele . '</span></td>'; echo '<th>'; echo '</thead>'; echo '<tbody>'; foreach ($rep as $val) { echo '<td>'; if ($val->type == LITTERAL) { echo '</td>'; } echo '<td>'; afficher_reponse_par_type($rep); echo '</td>'; } echo '</tbody>'; echo '<tfoot>'; echo '<button name="question">' . VALIDER . '</button>'; echo '</tfoot>'; echo '</table>'; }
function affichage_reponses_of_question_for_user($q_id) { $reponses = get_question_reponses($q_id); echo '<div id="list_reponses_' . $q_id . '" class="panel-collapse collapse">'; echo '<table>'; foreach ($reponses as $key => $r) { echo '<tr>'; ?> </td> <td> <a href="<?php echo ROOT . '?action=' . DELETE_REPONSE . '&' . ID . '=' . $r->ID_REPONSE; ?> " class="need_confirm"> Supprimer </a> <span> - </span> <a href="<?php echo ROOT . '?action=' . MONTER_REPONSE . '&' . NUM1 . '=' . $q_id . '&' . NUM2 . '=' . $r->NUM; ?> "> Monter</a> <span> - </span> </div> </td> <?php echo '<td>'; echo '<span> - </span>'; if ($r->TYPE == TYPE_INTERVAL) { echo $r->MIN . '<>' . $r->MAX; } else { echo $r->LIBELE; } echo '</tr>'; } echo '</table>'; echo '</div>'; }