Preserve AI comments in PDF output
This commit is contained in:
@@ -0,0 +1 @@
|
||||
-- Brak zmian w schemacie bazy danych w wersji 1.43.40.
|
||||
@@ -51,9 +51,11 @@ $resolveImageUrl = static function ($path) {
|
||||
const visibleAiFeedback = document.querySelector('.ai-feedback-screen[data-question-id="' + questionId + '"] .ai-feedback-text')?.textContent.trim() || '';
|
||||
const aiComment = storedAiFeedback || visibleAiFeedback;
|
||||
const output = commentBlock.querySelector('.result-pdf-comment-text');
|
||||
const selectedComment = manualComment || aiComment;
|
||||
|
||||
if (output) {
|
||||
output.textContent = manualComment || aiComment || '—';
|
||||
// Keep the server-rendered AI fallback when no input/source is found in the DOM.
|
||||
if (output && selectedComment) {
|
||||
output.textContent = selectedComment;
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -179,7 +181,7 @@ $resolveImageUrl = static function ($path) {
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($question->question_type === 'open' && $hasResponse) : ?>
|
||||
<div class="row mt-3">
|
||||
<div class="row mt-3 no-print">
|
||||
<div class="col-md-3">
|
||||
<label for="awarded-points-<?php echo (int) $questionId; ?>" class="form-label"><?php echo \Joomla\CMS\Language\Text::sprintf('COM_TESTQUESTIONS_RESULT_AWARDED_POINTS', (int) ($question->points ?? 0)); ?></label>
|
||||
<input type="number" min="0" max="<?php echo (int) ($question->points ?? 0); ?>" name="awarded_points[<?php echo (int) $questionId; ?>]" id="awarded-points-<?php echo (int) $questionId; ?>" class="form-control" value="<?php echo (int) ($answer['awarded_points'] ?? 0); ?>">
|
||||
|
||||
Reference in New Issue
Block a user