FMCorz / moodle-block_xp

A gamification plugin for Moodle allowing students to gain experience points and level up.
https://levelup.plus/?ref=github
149 stars 42 forks source link

Level should not show navbar when XP is not used in course #166

Open jrm-unamur opened 1 month ago

jrm-unamur commented 1 month ago

Hi there,

When admin setting block_xp/navbardisplay is activated, the level is displayed in all courses even if the block is not present in course. IMHO the level should be dipsplayed ONLY in courses where block_xp is activated

Kind regards

FMCorz commented 1 month ago

Hi @jrm-unamur,

Thanks for reporting this. You are right, the level is displayed in the navbar even for courses where the block was not added. This is indeed a bug. In the meantime, to mitigate this, you could use roles to remove/add the permission block/xp:view from the student role in the courses where XP should be hidden/shown.

jrm-unamur commented 1 month ago

Thanks for prompt answer Frédéric. Do you plan to fix this in a next release? The permission trick is ok, but with many courses and few advanced teachers, it's not really easy to get them do this manipulation ;-)

Kind regards

Jean-Roch

FMCorz commented 1 month ago

Yes, we will fix it in the next release. I understand the workaround does not scale, I shared it just in case it could be applied. Thanks again!