open-lms-open-source / moodle-filter_mediagallery

1 stars 3 forks source link

Only one mediagallery can be embedded on each page #1

Open aspark21 opened 8 years ago

aspark21 commented 8 years ago

Moodle 3.0 Stable latest Mediagallery mod/atto/filter master latest

When in a book / quiz, and using the atto media gallery button, one can embed multiple media galleries on one page and keep adding content to the page after that.

However, anything after the first gallery is not rendered wether remaining content or additional media galleries. All pages resources on the page return 200 status code despite this.

This I assume would be a limitation of the mediagallery filter a when switched off, the unrendered media gallery & additional content does load normally.

j3ffb commented 8 years ago

It looks as though the issue is to do with greedy matching in the RegEx. I have changed the expression to '#<a.*?class="filter_mediagallery".*?><img.*?alt="(\d+)"\s.*?></a>#i' and it works.