Ability to preload a user provided TWIG template

Ability to preload a user provided TWIG template

por M. César Rodríguez -
Número de respuestas: 1

Hi all,

Being a new user of CodeRunner since a couple of months. I'm more and more adding TWIG macros to my questions in all "Template parameters", "Question text" and "solution" fields. I tried to use TWIG's {% import %} from such fields in order to import a template uploaded via "support files", to no avail, though.

So i'm asking for a way to preload a user supplied TWIG template in such fields.

Thanks a lot for this superb work and regards.


En respuesta a M. César Rodríguez

Re: Ability to preload a user provided TWIG template

por Richard Lobb -

Unfortunately I don't have a solution for you right now. I assume you want to define the support macros in a separate file, available for import. There is a Support files capability for question authors to provide extra files but these are intended for use in the sandbox (Jobe) environment, not for use on the Moodle server where Twig runs.

I'll put this in a "to think about" queue. I'm getting very worried about feature bloat - CodeRunner is already rather too complicated for many users.