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
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?
The text was updated successfully, but these errors were encountered:
mattgig
changed the title
@@AUTOID@@@ not consistant
@@AUTOID@@ not consistant
Jun 30, 2023
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?
The text was updated successfully, but these errors were encountered: