31 lines
1 KiB
PHP
31 lines
1 KiB
PHP
<?php
|
|
$stmt_fdbck = $db["data"]->prepare(
|
|
"SELECT round_number, score, comment FROM assignments WHERE completed IS NOT NULL AND submission_id = :submission_id"
|
|
);
|
|
$stmt_fdbck->execute([
|
|
"submission_id" => $submission->id,
|
|
]);
|
|
$feedback = $stmt_fdbck->fetchAll(PDO::FETCH_OBJ);
|
|
?>
|
|
<div>
|
|
<h3>Feedback</h3>
|
|
<div role="region" aria-labelledby="feedback-caption" tabindex="0">
|
|
<table>
|
|
<caption id="feedback-caption">Feedback for "<?= $submission->title ?>"</caption>
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">Score</th>
|
|
<th scope="col">Comment</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($feedback as $item): ?>
|
|
<tr>
|
|
<td><?= $item->score ?></td>
|
|
<td><?= ($item->comment) ? mb_convert_encoding($item->comment, 'Windows-1252','utf-8') : '<i>No comment was provided.</i>' ?></td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|