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

Section zero name no longer null.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 3.2.2, 3.3
    • Course
    • None
    • MySQL 5.7.17 on Windows 10.
    • MOODLE_32_STABLE, MOODLE_33_STABLE
    • Hide

      Edit the database table 'course_sections', find the appropriate row for the course section and 'Clear' the 'name' field such that it is now 'null' again.

      Show
      Edit the database table 'course_sections', find the appropriate row for the course section and 'Clear' the 'name' field such that it is now 'null' again.
    • Hide
      1. Create a course in the Topics format.
      2. Set the 'Course layout' setting to 'One section per page'.
      3. In the course 'Click on Topic 1'.
      4. Observe that section zero does no have its title shown above 'Topic 1' (and the 'Announcements' forum if that course setting has been left at default).
      5. Turn editing on.
      6. Find the 'edit' drop down for section 0 at the top and 'Edit section'.
      7. Tick off 'Use default section name' and 'Save changes'.
      8. Repeat step '6' and observe that 'Use default section name' is now ticked again.
      9. Cancel any changes.
      10. Observe that section 0's default title of 'General' is not shown.
      Show
      Create a course in the Topics format. Set the 'Course layout' setting to 'One section per page'. In the course 'Click on Topic 1'. Observe that section zero does no have its title shown above 'Topic 1' (and the 'Announcements' forum if that course setting has been left at default). Turn editing on. Find the 'edit' drop down for section 0 at the top and 'Edit section'. Tick off 'Use default section name' and 'Save changes'. Repeat step '6' and observe that 'Use default section name' is now ticked again. Cancel any changes. Observe that section 0's default title of 'General' is not shown.

      When you edit the section title and turn off 'Use default section name' but don't type any text, save then go back then 'Use default section name' is ticked, however the database entry for that section in the table 'course_sections' - 'name' field is empty and no longer 'null' thus the logic:

      {code}

      // When on a section page, we only display the general section title, if title is not the default one
      $hasnamesecpg = ($onsectionpage && ($section->section == 0 && !is_null($section->name)));

      {code}

      in '/course/format/renderer.php' method 'section_header' fails.  Therefore when the course setting 'Course layout' is set to 'One section per page' and you click on a topic then you get the section 0 title 'General' even though 'Use default section name' is ticked.

       

            Unassigned Unassigned
            gb2048 Gareth J Barnard
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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