Hi everyone. As an administrator I'm unable to delete a Competencies Framework. I always get the message :
The competency framework 'English 1st year' cannot be deleted
What Am I doing wrong? Any idea?
Thanks in advance
Juanma
May be competency framework is used, framework is tree of competency. Some part of tree could be used in plan or course.
Bohus
Yes they cannot be deleted if they are in use.
Thank you both of you and sorry for the delay in replying.
Juanma
If you have an first level admin count and an access to your Moodle database you can do anything with phpMyadmin :>))
1) get the competency framework id (table mdl_competency_framework) of the framework to delete;
2) get all ids linked to this competency framework (table mdl_competency);
3) delete all lines of a lot of other tables like
DELETE `mdl_competency_usercomp`
WHERE competencyid = 101 OR
competencyid = 102 OR
competencyid = 103 etc.
mdl_competency_relatedcomp
mdl_competency_usercompcourse
mdl_competency_evidence
mdl_competency_userevidence
mdl_competency_userevidencecomp
mdl_competency_templatecomp
mdl_competency_usercompplan
mdl_competency_userplancomp
mdl_competency_coursecomp
mdl_competency_modulecomp
4) and do not forget to delete also the competency_plan and competency_template tables (learning plans linked to that competency framework).
Probably a specific tool for administrators would be a better solution!
I am having the same issue. Did the following steps to create my competency:
Then the following steps to remove my competency:
Is this a bug? I am using Moodle 3.1. This is really annoying because I forgot to fill in the qualitative scale for rating my competencies and now I cannot update it because the competency tree is linked to something. It auto-defaults to some scale (connected/separated learning).
Joining in this thread as I have a competency framework (used nowhere) that cannot be deleted.
This is a bit frustrating as the framework I created was just for learning purposes (for me to figure out how to use the frameworks) and now I want to delete it but can't
Any advice here? I know I can delete it from the database, as described earlier, but that can't be the design here. Surely there is a 'proper' way to do this...or this is a design flaw (bug)?
Jason
Just documenting what I've found here
1. I scoured the site to make sure I didn't have an orphan learning plan with the competency it in. Nothing
2. Made sure the learning plan link (from profile page) was empty
3. Checked the data base and in the mdl_competency_usercomp table there is a record for a competency being linked to my id (admin).
I don't know why this remains in the database but it is clearly why I'm not allowed to delete the framework. Apparently it didn't get deleted from the table when I deleted all the learning plans.
Continuing with the test, I deleted that row from mdl_competency_usercomp and BAM! Now I can delete the framework.
So, here is my guess. When the learning plan still existed, I associated the framework in question with it and awarded one of the competencies within it to myself. When I later deleted the framework the assignment to me was not. Maybe this is because I did all of this as admin? Maybe (hopefully) this is not an issue in a 'normal' situation (i.e. a teacher etc. assigning a competency to a student)?
At any rate, I'm back to the beginning where I can start with a clean slate.
Regards
Jason