When a single template is reset, the string displayed in the modal should
not reference to "all templates" to avoid confusion, as it was shown in the
original prototype for the 4.1 database project.
Calls to `str_ends_with` are polyfilled currently, as the method is
not present in PHP7.4 or earlier. We should avoid uses of it so as
to not trip up compatibility standard checkers.
MDL-75596 added an "Insert an activity or resource before ..." button
that allows adding an activity or a resource before or after another
activity in a course. This renders the button in the DOM (although
hidden and shown only on mouseover) when there's at least one activity
in the course.
In this issue, the button's label was renamed to "Add an activity or
resource before ..." and it now obscures the normal "Add an activity or
resource" button at the bottom of the course section from being
interacted on when running Behat tests.
This failure happens in the create_activity.feature file as it creates
two DB activities in a single scenario – one when "usecomments" is
turned on and one when it's turned off. Given this limitation, a
workaround is to split the "Teacher cannot enable comments if they are
disabled at site level" scenario into two scenarios with the first one
testing when "usecomments" is on while the second scenario testing when
"usecomments" is turned off.
* Add "Preview" and "Use this preset" menus to the preset plugin page's
burger menu
* Refactor importmapping dialogue to use the 'data-action' selector
* Add a new set_kebab_trigger action menu method
* Use set_additional_classes method for action menu
* Remove redundant parameter to add_action_menu
This commit adds new steps related to action menus to support:
* Choosing an item in a named action menu
* Choosing an item in a named action menu within a container
* Confirming that an action menu item does or does not exist in a named
action menu
* Confirming that an action menu item does or does not exist in a named
action menu within a container
The existing action menu steps were insufficient as they assume that
there is only one action menu within he container, which is not
necessarily the case.
The existing action menu steps are not non-JS friendly and will error if
JS is disabled, without providing any fallback when one is easily
available.
Unfortunately these steps cannot be used to replace the existing steps
without manual intervention.
On the Database page:
- The List/single view is displayed in the right.
- The buttons Import entries, export entries and Export to portfolio
have been moved to the Actions menu.
- The List/Single view headings have been removed.
- The "Save settings" secondary button is hidden when advanced search
is enabled.
- The result (Found X out of Y entries, No records found) are not
displayed as notifications anymore.
On the Presets page:
- The buttons (Import, Export and Save as preset) have been moved to an
actions menu to the tertiary navigation. Some of these options have been
renamed.
- Remove the Action column heading from the table.
On the Presets preview page:
- Move the preset name to the heading in the tertiary navigation (Preview
of xxxxx), and remove the current preset name from the page.
- Align the List/single template to the right in the tertiary navigation.
- Make primary the "Use this preset" button.
On the Fields page:
- Remove the "Manage fields" menu.
- Remove the Export and Save as preset from the tertiary navigation.
- Align Create a field to the right in the tertiary navigation.
- Add a description at the top of the page.
- Remove the Action column heading from the table.
- Move field actions (Edit and Delete) to ellipsis.
On the Templates page:
- Move Export and Save as preset to the Actions menu.
- Move the templates list to a tertiary navigation selector and remove
the template heading.
- Reorder the templates list (Add entry template should be displayed
at the begining, instead of List template).
- Rename "Enable editor" to "Enable code editor".
* Use a modal instead of a standard page to select the preset file
and import it.
* Change the zero state import button to a modal dialog so it uses the same
workflow as on the preset page
Each template should display at the top the information about the
user who has created the entry, when it was created and modified.
Apart from that, this commit also includes:
- For the Journal preset, a link on each card entry title has been
added, to open the Single view.
- For the Resources preset, the Author field has been renamed to
"Author of resource" and the Description to "Content".
- For the Resources preset, the Author and Type fields will be
hidden in the List view for small devices.
The mod_data is forcing teachers to understand how to write templates
even if they want to use basic forms. With this patch the default
templates will be auto updated unless the user manually define the
templates.
Apart from updating the default templates, to make them look better,
they have been also moved to mustache files, in order to make it easier
to edit them.