Hi,
I have added a new attribute to the Questionbase object
I have added a new input box to the create/edit question form and I have gotten the inputted data saving in the database. The data correctly loads when a created question is selected to be edited.
The bottom column of mdl_question is the column I have added to store the data I have saved. (As I said, saving and loading is working as intended)
I plan on using the data stored within "insertanswerintotemplate", within the question type template through "{{QUESTION.insertanswerintotemplate))" like other attributes such as "questiontext".
However, within the "run_tests" function in "JobRunner.php", the "$question" object does not contain the 'insertanswerintotemplate' attribute.
I have added a DB call here to add data to the 'insertanswerintotemplate' attribute, however, even with the data being manually assigned to the attribute, I can not reference "{{QUESTION.insertanswerintotemplate))" within the question type template. As a test I assigned the data retrieved from the DB to the questiontext attribute after it had been assigned to "$question->insertanswerintotemplate", and then accessed that ("{{QUESTION.questiontext))") from within the question type template, and the data was displayed,
Is there a step in the process that I may have missed to enable my new attribute to be accessible through the QUESTION Twig object through the question type template?
Sorry for the wall of information.
If you would like any other information, please ask.
Thank you for your help. It is all greatly appreciated
Kindest regards
James