This commit adds two new levels to the restore course structure form:
subsection (a delegated section that belongs to a course module) and
subactivity (a course module in a subsection).
Restore form can only use information from the backup file. To allow
activities to know if they are inside a subsection, the backup now
incorporates an "insubsection" attribute. This attribute is used only
for the form display but not for the restore logic.
The patch adds two new levels to the backup form structure: subsection
(a delegated section which parent is a course module) and subactivity
(an activity inside a subsection). Those new elements are displayed as a
inner section below the parent activitiy.
For now the UI is the same as a regular section but future issues will
define how the UX should be. The new two levels have their own classes
to represents settings and have extra dependencies.
`position: sticky` doesn't work in responsive tables because responsive
tables have scrollbars, making them the nearest ancestor with a
scrolling mechanism for the sticky header. As a result, the table can no
longer be responsive. This change is actually desired and was intended
for MDL-81860. Since we implemented it here, we can close the other
issue.
- Admin presets list has been converted to use Report builder
- Added ability to filter by name in the report
- Added confirmation modal when deleting presets
- Added inplace editable to rename custom presets
This commit adds all the logic to allow delegate sections backup and
restore. The backup and restore process is quite complex and it is not
designed to have task hierarchy. To solve the subsection problem, the
backup/restore planners do not include delegated sections at a course
level, but they are included when the activity with delegated section is
processed.
To allow restoing, the activity is responsible to store the
component/itemid mapping in the backup_structure_dbops. This way, when
the delegated section is restored (delegated sections are always
processed right after the parent activity) it can use the itemid
mapping.
Backup and restore settings needs to be refactored before introducing
subsections. With the current code adding two new hierachy levels
(subsections and activities in subsections) will require many
unnecessary lines of code because most of the structure is hard-coded.
With this patch when backup/restore present the course structure uses a
stack to control how mani divs are opened, instead of relying on adhoc
class attributes per each div.
About the tasks for sections and activities, the class has been
refactored. This way when subsections are introduced it will require
less lines of code and the final patch will be more comprehensible.