FMCorz / moodle-block_xp

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

Unable to make this rule works! #111

Closed aakashbashyal21 closed 4 years ago

aakashbashyal21 commented 4 years ago

I want to create a generic rule for all the "URL activity". It should allocate 2 points when the "URL Activity", is completed.

So, far i have been trying to work on this rule, but i felt that this feature is not available?

image

what i wanted is :

Give 2 points to my students when: -- An "Event name" is equal to "\core\event\course_module_completion_updated"
AND -- When:
-- The "Event component" contains 'mod_url'

Is there any workaround for with this generic rule? Isn't this possible with the current Level up!? or do i need to purchase the Level up!

I am using the moodle version 3.1.

FMCorz commented 4 years ago

Hi @aakashbashyal21,

The issue is that the event does not contain its originating module, hence your additional check on mod_url will cause all completion events to be discarded. You can try to combine it with the "Activity or resource" rule instead, it should work.

With Level up! Plus you would have a rule to target activity completion, which handles scenarios that cannot be handled by simply targeting the event name. However, you still wouldn't be able to reward the completion of any URL module for the same reasons.

aakashbashyal21 commented 4 years ago

combining with the "Activity or resource" rule instead, won't make the rule generic? It will be particular to some activity only and i have many at least 100 or activities to reward on completion. Also, i need to "reward the completion" completion with image, file and URL. So, it is not possible??

FMCorz commented 4 years ago

No, it won't make the rule generic, but at this stage there isn't any option to target completion the completion of specific module type. We will make a note that this would be useful and will consider it for future releases.