Closed nuria2c closed 3 years ago
Hi @nuria2c Excellent findings, i have replicated the issue and also got the fix for that, will release that fix shortly in a day or two with some more minor fixes. All the teachers will have the capability to create, update and manage teams. Thanks a lot again for taking this to my attention.
Hi @nuria2c Thank you for your time in this issue, the issue is fixed and released in the latest release. You can get the release from moodle or the main branch in git. Thanks
We've detected that only users with the site admin role can create "Debate teams". When a user with a teacher role wants to create the team, because the button is enabled, an error appears:
Sorry, but you do not currently have permissions to do that ({$a}). More information about this error
With the debuger error activated the error is.
_Sorry, but you do not currently have permissions to do that ({$a}). More information about this error ×Debug info: Error code: nopermissions ×Stack trace: line 498 of /lib/setuplib.php: moodle_exception thrown line 34 of /mod/debate/debate_teams_form_page.php: call to printerror()
In the "debate_teams_form_page.php" line 33 the code is:
if (!is_siteadmin()) { print_error('nopermissions', 'error'); }
After the teams created by an admin user, the teacher cant' manage the temas also.
If the users can't create teams, the "Create new team" button have to be disabled. If users can do that you can add the capability "Create debate teams". I think this is the correct option because the site admins don't have to create teams for all the other users.
https://www.loom.com/share/068756710b044f5c9ccc6b1d5f1c561b