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

Error "You cannot make a category of one of its own subcategories."

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.5.7
    • Fix Version/s: None
    • Component/s: Course
    • Labels:
    • Affected Branches:
      MOODLE_35_STABLE

      Description

      Hi! When copying one category to another, the error "You cannot make a category of one of its own subcategories." On closer examination, it turned out that if the category ID in which I copy, for example "320", then categories with ID 3 and 32 cannot be copied into it. This is checked by the condition in the file course / management.php in line 316:

      if (strpos ($movetocat > path, $cattomove> path) === 0) {

      It is not very clear why there is a condition of the form that checks the entry of the path?

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              denisvorobiev Denis Vorobiev
              Participants:
              Component watchers:
              Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: