Moodle

course/editcategory.php allows assigning the current or a child category as the parent category. Fix included.

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.9, 1.9.1
  • Fix Version/s: 1.9.4
  • Component/s: Course
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

Description

course/editcategory.php allows assigning the current or a child category as the parent category, which makes no sense.

When this happens, the affected course categories disappear.

Attached is a screenshot that displays the problem.

Also attached are three patch files. Three files are patched so that code duplication is avoided: the same logic is needed in course/index.php. I based the new code in lib.php on the existing code in index.php.

  1. course__editcategory_form.php.patch
    20/May/08 10:20 PM
    0.6 kB
    Brian King
  2. course__index.php.patch
    20/May/08 10:20 PM
    0.8 kB
    Brian King
  3. course__lib.php.patch
    20/May/08 10:20 PM
    0.8 kB
    Brian King
  1. My_parent_category_is_me.png
    123 kB
    20/May/08 10:20 PM

Activity

Hide
Tim Hunt added a comment -

Grabbing a bunch of related course category editing bugs that I plan to work on. Sorry for all the emails.

Show
Tim Hunt added a comment - Grabbing a bunch of related course category editing bugs that I plan to work on. Sorry for all the emails.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: