gjbarnard / moodle-format_topcoll

Collapsed Topics course format for Moodle.
http://docs.moodle.org/en/Collapsed_Topics_course_format
GNU General Public License v3.0
35 stars 60 forks source link

Edit section name button disappearing when moving section and Toggle word added #44

Closed kiratskitizing closed 5 years ago

kiratskitizing commented 5 years ago

When editing a course and moving a section, the editing icon used to rename a section disappears. The word - toggle also is appended to the recently moved section.

Steps to replicate:

Create a course. Use Collapsed Topics as the format. Turn editing on. Make sure you have more than 3 sections. Move section 5 to the first section Result: The "edit section name" icon will disappear and the word - Toggle will be appended.

gjb2048 commented 5 years ago

Plugin version 2018052302 and Moodle 3.5.3

gjb2048 commented 5 years ago

Toggle word not added but edit button does disappear.

gjb2048 commented 5 years ago

Patch is confusing as calls 'section_title' in '/course/format/renderer.php' which calls 'get_section_name' in '/course/format/lib.php' which is actually overridden in '/course/format/topcoll/lib.php' which calls 'get_topcoll_section_name($course, $section, false)' which is being called here https://github.com/gjb2048/moodle-format_topcoll/pull/45/commits/8b4e7a7c3bbf2881241c5b366b4d6ea0af415c51#diff-828043dc9f8d10ccd58ff8b96297794fL282 - but with a different value for the last parameter.

So, what class is the renderer object here: https://github.com/gjb2048/moodle-format_topcoll/pull/45/commits/8b4e7a7c3bbf2881241c5b366b4d6ea0af415c51#diff-828043dc9f8d10ccd58ff8b96297794fR282?

gjb2048 commented 5 years ago

Need to backport.