-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
3.9.16, 3.11.9, 4.1.8, 4.2.5
-
MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_401_STABLE, MOODLE_402_STABLE
Current behavior:
Student can try to delete cross-referenced competency. This action leads to an error.
nopermissions
Sorry, but you do not currently have permissions to do that (Manage competency frameworks).
File: /lib/accesslib.php
Line: 870
Stack trace:
Error code: nopermissions
- line 870 of /lib/accesslib.php: required_capability_exception thrown
- line 3770 of /competency/classes/api.php: call to require_capability()
- line 3620 of /competency/classes/external.php: call to core_competency\api::remove_related_competency()
- line 261 of /lib/externallib.php: call to core_competency\external::remove_related_competency()
- line 81 of /lib/ajax/service.php: call to external_api::call_external_function()
Desired behavior:
Students do not see 'delete' icon.
Steps:
- Create competency framework and fill it with competencies
- Make some of the competencies cross-referenced
- Create a learning plan and add competencies to the learning plan
- Link competencies to a course
- Enrol a student on the course
- Login as the student and go to the competencies in the course
- Select a cross-treferenced competency
- Click Delete icon