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

"There are some broken rules require your attention." Where? #125

Open
caiadogithub opened this issue Feb 4, 2025 · 7 comments
Open

"There are some broken rules require your attention." Where? #125

caiadogithub opened this issue Feb 4, 2025 · 7 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@caiadogithub
Copy link

Hi,

I got this warning message: "There are some broken rules require your attention.", but when I try to filter out the broken rules I got this: "Nothing to display"

Image

@dmitriim
Copy link
Member

dmitriim commented Feb 4, 2025

Hi @caiadogithub !

Can you see broken rule(s) in the list without the filter applied?

@caiadogithub
Copy link
Author

caiadogithub commented Feb 5, 2025

Hi, Dmitriim,

There are no broken rules without the filter applied.

Ricardo

@dmitriim
Copy link
Member

dmitriim commented Feb 5, 2025

Have you checked your logs to figure out what rule is broken? Seems like the filter works as expected and the real issue is in the rule not being marked as broken after it broke?

@dmitriim
Copy link
Member

dmitriim commented Feb 5, 2025

I think the easiest way to fix it would be adding $rule->mark_broken(); here https://github.com/catalyst/moodle-tool_dynamic_cohorts/blob/MOODLE_404_STABLE/index.php#L40

PR is always welcome!

@caiadogithub
Copy link
Author

Hi, Dmitriim,

Added "$rule->mark_broken();" before "notification:: ...", but nothing has changed.

Ricardo

@dmitriim
Copy link
Member

dmitriim commented Feb 5, 2025

@caiadogithub I'm not sure what you mean by "nothing has changed", but doing that you should get at least one broken rule marked to be broken. So you should see it in the list of rules. Or you can run SQL on your DB to get broken rules. Something like:

SELECT * FROM {tool_dynamic_cohorts} WHERE broken = 1;

Hope that helps.

@caiadogithub
Copy link
Author

@dmitriim ,

"SELECT * FROM {tool_dynamic_cohorts} WHERE broken = 1;"

Thanks for the tip!! It is working now.

I think I deleted a cohort before deleting a dynamic rule.

Ricardo

@dmitriim dmitriim added bug Something isn't working help wanted Extra attention is needed labels Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants