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

Delete course fails to delete forum discussions

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Won't Fix
    • Affects Version/s: 1.5
    • Fix Version/s: None
    • Component/s: Forum
    • Labels:
      None
    • Environment:
      All
    • Affected Branches:
      MOODLE_15_STABLE

      Description

      When deleting a course, forum_delete_instance calls forum_delete_discussion, which in turn calls forum_delete_post with default second parameter $children=false. This causes forum_delete_post to fail if the post has replies. Consequently this leaves orphaned posts in the database.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            dougiamas Martin Dougiamas added a comment -

            From Eloy Lafuente (stronk7 at moodle.org) Friday, 24 June 2005, 01:31 AM:

            Good catch!

            Anyway, I think this change isn't correct:

            • if (($ownpost and $age < $CFG->maxeditingtime) or $isteacher) {

            + if ($ownpost or $isteacher) {

            because it will allow students to delete their posts always, isn't it?

            Perhaps a new $checkage parameter could be used to specify if we want to take care of $age or no.

            Ciao

            Show
            dougiamas Martin Dougiamas added a comment - From Eloy Lafuente (stronk7 at moodle.org) Friday, 24 June 2005, 01:31 AM: Good catch! Anyway, I think this change isn't correct: if (($ownpost and $age < $CFG->maxeditingtime) or $isteacher) { + if ($ownpost or $isteacher) { because it will allow students to delete their posts always, isn't it? Perhaps a new $checkage parameter could be used to specify if we want to take care of $age or no. Ciao
            Hide
            dougiamas Martin Dougiamas added a comment -

            Assigning to me temporarily because Vy-Shane no longer works for Moodle HQ.

            Show
            dougiamas Martin Dougiamas added a comment - Assigning to me temporarily because Vy-Shane no longer works for Moodle HQ.
            Hide
            salvetore Michael de Raadt added a comment -

            Thanks for reporting this issue.

            We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported.

            If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed.

            Michael d;

            lqjjLKA0p6

            Show
            salvetore Michael de Raadt added a comment - Thanks for reporting this issue. We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported. If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed. Michael d; lqjjLKA0p6
            Hide
            salvetore Michael de Raadt added a comment -

            I'm closing this issue as it has become inactive and does not appear to affect a current supported version. If you are encountering this problem or one similar, please launch a new issue.

            Show
            salvetore Michael de Raadt added a comment - I'm closing this issue as it has become inactive and does not appear to affect a current supported version. If you are encountering this problem or one similar, please launch a new issue.

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: