-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: twig tags for feedback modals #364
feat: twig tags for feedback modals #364
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my perspective, and not change the behavior of QTI-SDK, in case you simply wish to use Twig instead of the regular PHP template oriented notation (<?php if: ?>
and co.), is to augment the MarkupPostRenderer::render() method to make it Twig capable. It shoudln't be a big deal.
This would cover all the scenarios, using Twig, or the current implementation.
@@ -638,6 +643,10 @@ protected function processNode($base = ''): void | |||
$this->includeChoiceComponent($component, $rendering); | |||
} | |||
|
|||
if ($this->mustTwigFeedbackComponent($component) === true) { | |||
$this->twigFeedbackComponent($component, $rendering); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I propose to clear up the naming a bit. If I understand it correctly:
Does this mean if twig feedback component must be used? I propose to rename to:
if ($this->mustUseTwigFeedbackComponent($component) === true) { ... }
and set twig feedback component:
$this->setTwigFeedbackComponent($component, $rendering);
Hey! Thank you for your comment. For me, it is not clear the reason behind using two different renderers. I saw a way how I could generate
This should be replaced in |
Provide twig oriented feedback blocks rendering