Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event field blank #215

Open
jonnoconn opened this issue Feb 1, 2024 · 3 comments
Open

Event field blank #215

jonnoconn opened this issue Feb 1, 2024 · 3 comments

Comments

@jonnoconn
Copy link

jonnoconn commented Feb 1, 2024

I'm getting a strange issue with the Event to monitor field, as it is blank!

This occurs both when I create a new workflow, or try to edit one of the examples provided (which are really helpful). When I upload one of the examples, they run fine.

Blank-event-field-in-plugin

I want to watch for when someone pays, then add them to our payer cohort. Just trying to avoid having to write out the json manually.

Running Moodle 4.3
Event Trigger version: 2021030400
Tried on Chrome, Safari and Firefox.

In debug mode, I see a bunch of warnings like:

  • Warning: Undefined array key "Reports" in /var/www/html/moodle/admin/tool/trigger/edit.php on line 71
  • Warning: Undefined array key "Quiz / Access rules" in /var/www/html/moodle/admin/tool/trigger/edit.php on line 71
  • Warning: foreach() argument must be of type array|object, null given in /var/www/html/moodle/admin/tool/trigger/edit.php on line 71
@adminGPTeach
Copy link

Hello @jonnoconn , Could you solve it by refilling it manually? I'm facing the very same issue, and can't find the function get_all_events() in order to check whether the issue is maybe wrong name of tables, or whatever.

@jonnoconn
Copy link
Author

jonnoconn commented Mar 8, 2024

Hi. I found the only way to solve it was by building my own json externally to the system and uploading it (I used the samples provided as the base/ format). It was very manual. the big challenge was testing it. If I tried viewing it once it was uploaded, fields would be removed. So I had to blind test. Not a great way, but it worked.

@adminGPTeach
Copy link

adminGPTeach commented Mar 8, 2024

Glad it worked. If it isn't too much trouble could you please tell me in which file you placed the json file and where exactly?
I read the events API. I only need the event of "core\event\user_created" to run a script that I have in /local/. Also, read the sample_workflows. But I still lost. I'm a beginner in programming. Thanks ahead @jonnoconn

image

I gues I would need to replace the event and the call to action to make for example a HTTPOST to my script, right?
example json.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants