You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm reporting the issue to the correct repository.
I am running the latest version of this plugin (if not, please upgrade first).
I checked the README.md and Wiki documentation but did not find my answer.
I searched to make sure that this issue had not already been reported.
I have, or I know someone who has, the ability and willingness to test the fix on a Moodle LMS-based site.
I am submitting no more than one bug report per issue ticket (please do not submit multiple bugs in one issue ticket).
I understand that support is provided by volunteer(s).
What happened?
The plugin doesn't account for possible circular references with certain tags.
For example, a teacher may rename their course to "Test course {coursename}". This will render the course unusable, as when the filter is applied, the course name will be converted "Test course Test course {coursename}" and so on. Moodle will raise a Fatal Error: Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 262144 bytes) in moodle311\lib\moodlelib.php on line 7301
Similarly, adding {coursesummary} to the summary of the course, will render the moodle mobile application unusable. In the website the summary of the course is visible only on the first page, but it has the front page context and the filter prints the site summary (as expected from the instructions). However, in the mobile app, the summary of the course is visible on the course page and thus has the course context, leading to a similar error as above.
What do you think should have happened?
The plugin should prevent possible circular references in the filters.
Steps to reproduce
Login as a teacher
Create a course with the name "Test course {coursename}"
Save the course
Try navigating to the course
Screenshots
No response
Moodle version
Moodle 3.11.11+ (Build: 20221201)
Installed Moodle UI Language packs.
English only
One or more other languages/regional dialects (specify below)
Thank you for bringing these issues to my attention. Unfortunately I do not have a quick fix available for you right now because I am not sure how to detect what field the tag is located in.
However, a workaround currently available would be to place square brackets around tags if you do not want them to be interpreted. Example:
Test course [{coursename}]
If you are already experiencing this situation, you could turn FilterCodes off temporarily, update the fields with the square brackets and the re-enable FilterCodes.
Alternatively, you could turn off FilterCodes for a particular course. If you don't want to constantly escape the tags with square brackets.
More information is available in the README.md file included with the plugin.
If you have any suggestions, I would welcome any Pull Requests or suggestions that you might be willing to contribute.
Prerequisites
What happened?
The plugin doesn't account for possible circular references with certain tags.
For example, a teacher may rename their course to "Test course {coursename}". This will render the course unusable, as when the filter is applied, the course name will be converted "Test course Test course {coursename}" and so on. Moodle will raise a Fatal Error:
Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 262144 bytes) in moodle311\lib\moodlelib.php on line 7301
Similarly, adding {coursesummary} to the summary of the course, will render the moodle mobile application unusable. In the website the summary of the course is visible only on the first page, but it has the front page context and the filter prints the site summary (as expected from the instructions). However, in the mobile app, the summary of the course is visible on the course page and thus has the course context, leading to a similar error as above.
What do you think should have happened?
The plugin should prevent possible circular references in the filters.
Steps to reproduce
Screenshots
No response
Moodle version
Moodle 3.11.11+ (Build: 20221201)
Installed Moodle UI Language packs.
If other language(s), please specify
No response
Workaround
No response
Additional information
No response
System information
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: