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

assignment files are never deleted when a user is deleted

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a bug
    • Icon: Minor Minor
    • None
    • 4.2.6, 4.3.3, 4.4
    • Assignment, Privacy
    • MOODLE_402_STABLE, MOODLE_403_STABLE, MOODLE_404_STABLE
    • Hide

      To be sure of removing the files from the assignment module, you must delete the assignment instance.

      Show
      To be sure of removing the files from the assignment module, you must delete the assignment instance.
    • Hide

      Test:

      1. as admin, create a new user named "student" in site administration > users > add a new user
      2. as admin, create a new course and enrol "student" in this course
      3. as admin, create a new assignment activity in this course
      4. login as "student" and submit the file "sample.txt" in assignment activity
      5. check in your database that the file is present in "files" table

        SELECT contenthash, component, filename FROM mdl_files WHERE contenthash = 'b488e0740c94d4811e29350222f3bf2373d1b214' and component = 'assignsubmission_file';
        

      6. login as admin and delete "student" in site administration > users > browse list of users
      7. execute again this SQL query:

        SELECT contenthash, component, filename FROM mdl_files WHERE contenthash = 'b488e0740c94d4811e29350222f3bf2373d1b214' and component = 'assignsubmission_file';
        

       

      Current result:
      The SQL query still returns a record.

       

      Expected result:
      The SQL query should returns an empty result.

      Show
      Test: as admin, create a new user named "student" in site administration > users > add a new user as admin, create a new course and enrol "student" in this course as admin, create a new assignment activity in this course login as "student" and submit the file " sample.txt " in assignment activity check in your database that the file is present in "files" table SELECT contenthash, component, filename FROM mdl_files WHERE contenthash = 'b488e0740c94d4811e29350222f3bf2373d1b214' and component = 'assignsubmission_file' ; login as admin and delete "student" in site administration > users > browse list of users execute again this SQL query: SELECT contenthash, component, filename FROM mdl_files WHERE contenthash = 'b488e0740c94d4811e29350222f3bf2373d1b214' and component = 'assignsubmission_file' ;   Current result: The SQL query still returns a record.   Expected result: The SQL query should returns an empty result.

      All files submitted by a user in the assignment module are kept forever in the database (and on disk), even if the user is deleted in the administration.

            dobedobedoh Andrew Lyons
            jboulen Julien Boulen
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 15 minutes
                15m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.