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

Modules are not correctly added to sections

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Minor Minor
    • None
    • 2.3.6
    • Course
    • None
    • MOODLE_23_STABLE

      The function add_mod_to_section in the course/lib.php library does not correctly locate the course section where the course module is to be added.

      The code uses the following query to find the section:

      {$DB->get_record("course_sections", array("course"=>$mod->course, "section"=>$mod->section))}

      It should be changed to:

      {$DB->get_record("course_sections", array("course"=>$mod->course, "id"=>$mod->section))}

      The $mod->section field should refer to the course_sections.id and not to the course_sections.section field

            poltawski Dan Poltawski
            pcharsle Paul Charsley
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

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