Closed adpe closed 4 years ago
Hi @adpe I had some difficulty getting your code to work. I think it was around using user as an archetype. I also changed to contextlevel to course (I've checked and this works for profile contexts, block contexts etc), and I reorganised the ternary operator on the enable button, to make it clearer to read. Would appreciate if you could check the updates work for you.
You might need to uninstall and reinstall the plugin for the user permissions to change. The changes are on the permissions branch.
HI @sharpchi
I don't think that caps for user
should lead to problems. But yes, not every authenticated user should be able to use this plugin - I'm with you. The context I took from recordrtc
and I would go with that (as I noticed it doesn't change functionality).
Furthermore I would use the context_system
if the context is not set already by the passed $options
array in atto_templates_params_for_js
. Debugging that I noticed following (and recordtc
uses that as well) :
Course -> Forum > Add discussion
context => context_module
Course -> HTM block > Edit block
context => context_block
System -> Profile > Edit profile
context => context_user
The change with the ternary operator looks better and it's indeed easier to read, thanks!
Please check my new changes and would be great have this integrated into master, Adrian
Edit
Please update the version and release it like you want (I don't edited the file because of that).
Kind of merged in https://github.com/sharpchi/moodle-atto_templates4u/commit/a81a3213f5ace82044bf55a282d509a49213b85c. So I will close this one.
Thanks @sharpchi, Adrian
New request origin from https://github.com/sharpchi/moodle-atto_templates/pull/4