Open mattgig opened 1 year ago
Yes you are correct that it is inconsistent. It should not be this way, but I have not yet figured out how to implement it. This is because the start and close tags are treated as two separate filter strings, witjh two separate passes of the filter processing script.
In practice I just do all the processing that requires the @@AUTOID@@ in the start tag or js, and leave only static html in the end tag. But sometimes that really does make it hard.
When you add an @@AUTOID@@ to the "body of template X" section and again to the "End tags (template X") section in Moodle 4.2, two different strings are generated.
The above template results in two different AUTOIDs:
This is contrary to what you would expect, namely the AUTOID to be consistant within the filter area. And it makes selecting corresponding DOM elements very difficult.
Is this the intended behaviour or a bug?