About
With the action Credits of the automation engine, you can allocate credits to users. The credits can act as an in-Moodle currency but can also be used as part of a rewards system or gamification setup. Allocated credits are stored in the configured profile field and can be displayed in the menu bar for all logged-in users.
Note: You can override automated credit allocations on course level or globally.
Important: Anyone with the permission to create automations has full control over credits and can also set them to 0.
Available settings
Status
Enable credits to activate it and access all available configuration options.Credits
Set the credit amount allocated to the user. This field supports up to two decimals. Negative values are not supported.
Allocation method
Choose one of the following methods:
Add credits – Adds the configured amount of credits to the recipient’s existing total.
Replace credits – Replaces the recipient’s current credit balance with the configured amount.
Interval
Define how often credits are allocated. Options include once, daily, weekly, monthly, yearly, or custom (crontab). Depending on your choice, additional parameters such as time, day, or date may become available.
Crontab schedule
Use this option to define a custom interval using standard crontab syntax. This is an advanced setting intended for power users who need highly specific schedules.
* – Any value (wildcard)
Number – Specific value (e.g., 5)
Range – Range of values (e.g., 1-5)
List – Multiple values separated by commas (e.g., 1,3,5)
Step – Every nth value (e.g., */5 for every 5 minutes or 1–20/2 for every second value in the range 1–20)
Base date
Choose how the start date for credit allocation is determined.
Relative to enrollment – The allocation date is calculated based on the user’s enrollment date.
Fixed date – The allocation date is calculated based on a fixed date.
Fixed date
If you selected “Fixed date” as the base date, enter the specific date for allocation.
Recipients
Define who receives the credits. Eligible recipients are determined by the permission
pulseaction/credits:receivecredits.
Tip: Combine credits and notifications in the same instance to inform recipients about allocation of credits.