MDL-78708 core_courseformat: Fix activity icon link shown without access
commit628336f639039488151e47743e7abc304d268f9d
authorMikel Martín <mikel@moodle.com>
Wed, 19 Jul 2023 13:06:33 +0000 (19 15:06 +0200)
committerMikel Martín <mikel@moodle.com>
Tue, 1 Aug 2023 14:03:10 +0000 (1 16:03 +0200)
tree5669a21212d4e7bdbcc4d6b302e4a8fd1645ed60
parenta1d5d1b2f758a3178bff4c42883a477f4b1ea50c
MDL-78708 core_courseformat: Fix activity icon link shown without access

In course page activity icon was showing as a link even when the user
does not have access to the activity. This commit fixes this behaviour
checking if activity is visible for the user and showing the icon without
link if not.
course/format/classes/output/local/content/cm/cmicon.php
course/format/templates/local/content/cm/cmicon.mustache
course/format/tests/behat/activity_icon_tooltip.feature