Comment 9 for bug 1690232

Reviewed: https://reviews.mahara.org/7781
Committed: https://git.mahara.org/mahara/mahara/commit/84a76f608d089e2cf1de395eda1d17a7a77ce4b6
Submitter: Robert Lyon (<email address hidden>)
Branch: 16.10_STABLE

commit 84a76f608d089e2cf1de395eda1d17a7a77ce4b6
Author: Robert Lyon <email address hidden>
Date: Sun May 14 16:09:28 2017 +1200

Bug 1690232: Comments link on retractable block failing to open modal

Actually the modal is opening and closing in the same instant.

This is caused by some code dealing with collapsible blocks making
sure modals are closed if outside certain rules.

This change checks what modal we are wanting and closing all but the
one are targeting when clicking the 'comments' link

behatnotneeded

Sponsored by SWITCH

Change-Id: Idb5165bdc8349f77286aa776ff75d152968aefda
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 5ce66781dfa1bd23f1bb632b9e61e68677259358)
(cherry picked from commit b2858fcf96d80809b8a9d6af4a85a9fc8d7fc392)