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

When this plugin appears second alongside another activity restriction (from plugin availability_gwpayments) it throws an error and fails #5

Open
jgramp opened this issue Oct 11, 2021 · 2 comments

Comments

@jgramp
Copy link

jgramp commented Oct 11, 2021

When this plugin appears first in a list of restrictions it works fine. When it appears second alongside other activity restrictions (https://github.com/sebsoftnl/moodle-availability_gwpayments) it throws an error and fails:

error/No credit condition for this context.

More information about this error

×Debug info:
Error code: No credit condition for this context.
$a contents:
×Stack trace:
line 43 of /availability/condition/credit/view.php: moodle_exception thrown

This happens whether it is set to AND or OR in the restriction list.

@stefanscholz
Copy link
Member

Hi Jessica,

Thanks for reporting this issue.

I've tried various restrictions respectively combinations of restrictions, e.g.:

  • Date AND Credit
  • Activity completion AND Credit
  • Grade AND Credit OR Date
    But I don't get any errors.

Can you please add more details and exact steps how to reproduce the issue?

(We only tested combining it with other core restrictions, the one which you mention is pretty new, and we don't use it ourselves)

We tested on 3.9,3.10 and 3.11.

Thanks
Stefan

@jgramp
Copy link
Author

jgramp commented Nov 11, 2021

Thanks Stefan.
It sounds like it might be an issue unique to this other plugin then.
That's ok. We can simply order this one first, as that looks better anyway.
I wanted to raise this issue in case anyone else experienced it and so you were aware.
Thanks for testing.

@jgramp jgramp changed the title When this plugin appears second alongside other activity restrictions it throws an error and fails When this plugin appears second alongside another activity restriction (from plugin availability_gwpayments) it throws an error and fails Nov 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants