Project

General

Profile

Bug #6189

Deleting a course does not delete c_tool records

Added by Yannick Warnier over 6 years ago. Updated about 4 years ago.

Status:
Rejected - Abandoned
Priority:
Normal
Category:
Administration
Target version:
Start date:
03/06/2013
Due date:
% Done:

20%

Estimated time:
Spent time:
Complexity:
Normal
SCRUM pts - complexity:
?

Description

When deleting a course, records of this course in the c_tool table remain. These should be deleted.

History

#1

Updated by Julio Montoya over 6 years ago

  • Status changed from New to Needs more info
  • Assignee changed from Julio Montoya to Yannick Warnier
  • % Done changed from 0 to 20

I can't reproduce the error.

The line that deletes the "c_tool" is here.

In course.lib.php in the delete_course() function, the $course_tables contains an array with the course tables including the c_tool.

  $course_tables = self::get_course_tables();

        // Cleaning c_x tables
        if (!empty($courseInfo['id'])) {
            foreach ($course_tables as $table) {
                $table = Database::get_course_table($table);
                $sql = "DELETE FROM $table WHERE c_id = $courseId ";
                Database::query($sql);
            }
        }
#2

Updated by Yannick Warnier about 4 years ago

  • Status changed from Needs more info to Rejected - Abandoned
  • Target version changed from 2.0 to 1.10.0

Indeed, this seems fixed (or a non-issue)

Also available in: Atom PDF