marinaglancy / moodle-format_flexsections

25 stars 25 forks source link

Add subsection below #45

Closed kabalin closed 1 year ago

kabalin commented 1 year ago

This patch suggests a feature to simplify adding the section to the same level. Suppose you have several subsections with content, in order to add another one to bottom, one would need to locate the parent and use its actions menu. If one needs to add section after any existing subsections, one would need to locate the parent and use its actions menu, then move newly created section to the right location. This is very inconvenient especially at content-rich courses.

Suggested solution: image

Notice, the patch contains commit from #44 which it depends on (needs to be merged after that one).

marinaglancy commented 1 year ago

Hi Ruslan, thanks for this PR. Unfortunately it does not work very well for me, there are several things:

  1. I can not add sections between sections for the top-level sections, button does not appear
  2. If a section has subsections the button "Add section below" appears above the list of subsections but actually adds a section below the list of subsections. It is especially confusing when the list of subsections is big, I just clicked the button several times thinking that nothing happens but apparently it was adding these new sections way below.
  3. If a section is displayed "as a link", the button to add subsection below does not appear under it
  4. The button "Add section" in the bottom looks really bad now and has completely different style

It looks like it needs a little more work

marinaglancy commented 1 year ago

Hi Ruslan, I have added "Add section" link between first-level sections (see also https://github.com/marinaglancy/moodle-format_flexsections/issues/56 ), it uses the same/similar element as the format_topics.

kabalin commented 1 year ago

Hi Ruslan, I have added "Add section" link between first-level sections (see also #56 ), it uses the same/similar element as the format_topics.

Yeah, not quite the same though, the purpose of this was to simplify adding same level subsections in between others without need to scroll and find its parent. I might get to this one and resubmit with fixes one day.