FMCorz/moodle-block_xp

Unable to make this rule works!

Closed this issue · 3 comments

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.

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.

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??

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.