Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-60126

Competency user data is not being erased when user gets deleted

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: 3.1.8, 3.2.5, 3.3, 3.4, 3.8
    • Fix Version/s: None
    • Component/s: Competencies
    • Testing Instructions:
      Hide

      As this introduce a new upgrade step, do not upgrade. If you already did, create a separated branch and revert the commits of this issue.
      In order to fully test this change, we will need to create user data on competency tables related to user, run the upgrade and make sure all user data has been removed.
      Sorry, the testing instructions are a bit of pain, we want to fully remove user data.

      1. Log in as admin.
      2. Go to Site administration > Competencies > Competency frameworks
      3. Create a competency framework
      4. Add a competency to that competency framework.
      5. Go to a existing course, or create one.
      6. Enrol an student,* make note of this user id.*
      7. On the course, click on Competencies on the navigation drawer.
      8. Then click Add competencies to course, and select the competency you just created.
      9. Create an assignment, expand Competencies section, search and select the competency and select Send for review on Upon activity completion.
      10. Go to participants page, click on the user you have enrolled to go to his profile page.
      11. Under miscellaneous, click Learning plans.
      12. Click Add new learning plan button and add a new learning plan for that user.
      13. Log out and log in as student that you enrolled.
      14. Go to your profile page, under miscellaneous, click Learning plans.
      15. On the user learning plan page, and click Evidence of prior learning link
      16. Click Add new evidence button and add a new evidence.
      17. Go to that course you are enrolled in.
      18. Complete this assignment (manually mark it as completed).
      19. Now, go to your database and look the following tables:
        • competency_usercomp, competency_evidence, competency_usercompcourse, competency_usercompplan, competency_userevidencecomp , competency_userevidence, competency_plan, competency_plancomp
        • Have look on the tables for userid field and other foreign keys, for example competency_plancomp will use competency_plan id and etc. You can look on the patch thas has roughly the structure of tables.
      20. Log out and log in as admin.
      21. Go to Site administration > Users > Accounts > Browse list of users.
      22. Delete the student you used to submit the assignment.
      23. Now, upgrade!
      24. Go to your database and look the tables above for user data of the user you have deleted.
      25. All user data related to that user id should now be removed.
      Show
      As this introduce a new upgrade step, do not upgrade. If you already did, create a separated branch and revert the commits of this issue. In order to fully test this change, we will need to create user data on competency tables related to user, run the upgrade and make sure all user data has been removed. Sorry, the testing instructions are a bit of pain, we want to fully remove user data. Log in as admin. Go to Site administration > Competencies > Competency frameworks Create a competency framework Add a competency to that competency framework. Go to a existing course, or create one. Enrol an student,* make note of this user id.* On the course, click on Competencies on the navigation drawer. Then click Add competencies to course , and select the competency you just created. Create an assignment, expand Competencies section, search and select the competency and select Send for review on Upon activity completion . Go to participants page, click on the user you have enrolled to go to his profile page. Under miscellaneous, click Learning plans . Click Add new learning plan button and add a new learning plan for that user. Log out and log in as student that you enrolled. Go to your profile page, under miscellaneous, click Learning plans . On the user learning plan page, and click Evidence of prior learning link Click Add new evidence button and add a new evidence. Go to that course you are enrolled in. Complete this assignment (manually mark it as completed). Now, go to your database and look the following tables: competency_usercomp , competency_evidence , competency_usercompcourse , competency_usercompplan , competency_userevidencecomp , competency_userevidence , competency_plan , competency_plancomp Have look on the tables for userid field and other foreign keys, for example competency_plancomp will use competency_plan id and etc. You can look on the patch thas has roughly the structure of tables. Log out and log in as admin. Go to Site administration > Users > Accounts > Browse list of users. Delete the student you used to submit the assignment. Now, upgrade! Go to your database and look the tables above for user data of the user you have deleted. All user data related to that user id should now be removed.
    • Affected Branches:
      MOODLE_31_STABLE, MOODLE_32_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_38_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-60126-master

      Description

      All the CBE related user data is not removed when the user gets deleted. We need to discuss and decide if all user data should be removed or just the data the user has added (eg. evidence).

      We should also consider deleting the users files related to competencies (eg. evidence files) and then in the upgrade add an adhoc step to be called which deals with the deletion.

      Please read comments on MDL-59994.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                lameze Simey Lameze
                Participants:
                Component watchers:
                Damyon Wiese, Jean-Philippe Gaudreau, Steve Massicotte, Serge Gauthier, Issam Taboubi, Adrian Greeve, Mihail Geshoski, Peter Dias
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: