258 Commits

Author SHA1 Message Date
Mathew May
e5ca7766e7 MDL-52805 core: Remove legacy log calls 2023-03-07 13:08:46 +08:00
Sara Arjona
529faa9eaa MDL-77276 mod_data: Update reset single template string
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.
2023-02-24 11:21:49 +01:00
Andrew Nicols
2de031b74c Merge branch 'MDL-76066-master' of https://github.com/aanabit/moodle 2023-02-09 10:27:00 +08:00
Andrew Nicols
2f2c587552 Merge branch 'MDL-77100' of https://github.com/paulholden/moodle 2023-02-02 08:30:02 +08:00
Paul Holden
0f58d46b05 MDL-77100 mod_data: replace calls to str_ends_with, fix assertions.
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.
2023-01-31 21:35:33 +00:00
Ferran Recio
0213df2f03 MDL-75498 mod_data: add extra tags to templates 2023-01-30 12:01:20 +01:00
Amaia Anabitarte
d4e66f1df5 MDL-76066 mod_data: Trigger field_deleted event when importing 2023-01-23 18:53:44 +01:00
Jun Pataleta
fad05d7929 Merge branch 'MDL-76583-master-withoutrename' of https://github.com/andrewnicols/moodle 2023-01-19 09:44:48 +08:00
Andrew Nicols
a3cc26f8bb MDL-76583 core: Update uses of external_* classes 2023-01-19 07:34:09 +08:00
Jun Pataleta
aedbfba858 Merge branch 'MDL-76358-master' of https://github.com/laurentdavid/moodle 2023-01-16 09:32:56 +08:00
Jun Pataleta
25ff4c441b MDL-76739 mod_data: Split comments test into two
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.
2023-01-12 17:05:55 +08:00
Andrew Nicols
f516200459 Merge branch 'MDL-76839' of https://github.com/paulholden/moodle 2023-01-12 10:56:33 +08:00
Laurent David
45317d6db5 MDL-76358 mod_data: Add options to preset menu
* 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
2023-01-11 10:59:04 +01:00
Paul Holden
1bf87e87a4 MDL-76839 mod_data: correct external test class coverage notation. 2023-01-10 12:59:06 +00:00
Andrew Nicols
35eb66d9dc MDL-76811 mod_data: Remove duplicate tests 2023-01-10 11:39:40 +08:00
Andrew Nicols
cec147f428 MDL-76811 mod_data: Stop testing template creation on field creation
The default template is no longer created when creating the fields with
the generator, so we should stop testing that it is.
2023-01-10 11:39:40 +08:00
Andrew Nicols
103b17c761 MDL-76811 mod_data: Generator test cleanup 2023-01-10 11:39:39 +08:00
Víctor Déniz
d4de7b630e MDL-76395 lang: Use fixed strings in tests 2022-11-23 17:03:58 +00:00
David Mudrák
5e2e7562b6 MDL-76105 lang: Use fixed strings in tests, too. 2022-11-17 10:37:45 +00:00
Amaia Anabitarte
5f6d35e471 MDL-76083 mod_data: Fix preset importer to remove existing fields.
* We should delete fields that have not been marked as to preserve.

Co-authored by: Laurent David <laurent.david@moodle.com>
2022-11-16 16:23:42 +01:00
Sara Arjona
8e535a2346 Merge branch 'MDL-75492-master' of https://github.com/aanabit/moodle 2022-11-16 10:30:47 +01:00
Amaia Anabitarte
1c968103b7 MDL-75492 mod_data: Remove redirection messages on preset apply process 2022-11-16 09:08:26 +01:00
Amaia Anabitarte
9b343752e2 MDL-75492 mod_data: Cosmetic changes on mapping page 2022-11-16 09:08:26 +01:00
Amaia Anabitarte
81b761bab0 MDL-75492 mod_data: Show mapping dialog 2022-11-16 09:08:26 +01:00
Amaia Anabitarte
b755cfa544 MDL-75492 mod_data: Refactor code to get available importing information 2022-11-16 09:08:26 +01:00
Amaia Anabitarte
5a880405bf MDL-75492 mod_data: Removing duplicated behats 2022-11-14 17:23:30 +01:00
Ferran Recio
151b0ba350 MDL-75410 mod_data: reset all templates feature 2022-11-11 10:48:42 +01:00
Sara Arjona
add46e3112 Merge branch 'MDL-76169-master' of https://github.com/andrewnicols/moodle 2022-11-04 12:06:36 +03:00
Andrew Nicols
232ebac338 MDL-76169 behat: Add improved steps for using action menus
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.
2022-11-03 21:39:15 +08:00
Sara Arjona
61e8b806ec MDL-75289 mod_data: Implement prototyped tertiary nav
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".
2022-10-31 15:24:13 +01:00
Laurent David
d67fbbb80d MDL-75188 mod_data: Move import preset for to a modal
* 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
2022-10-27 18:32:23 +02:00
Amaia Anabitarte
ab97d41644 MDL-75335 mod_data: Zero state for Fields and Templates 2022-10-25 16:35:58 +02:00
Amaia Anabitarte
32c8f75c0d MDL-75335 mod_data: Change Use a preset string 2022-10-25 16:05:24 +02:00
Sara Arjona
16ba7cbe96 MDL-75684 mod_data: Add metadata to templates
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.
2022-10-24 13:01:39 +02:00
Sara Arjona
09a2c6a0e8 MDL-75684 mod_data: Add author name/lastname to adv search
Add the "First name" and "Last name" fields at the beginning of the
advanced search template for all the presets.
2022-10-24 13:01:39 +02:00
Sara Arjona
31419c1f28 Merge branch 'MDL-75211-master' of https://github.com/ferranrecio/moodle 2022-10-21 09:07:58 +03:00
Jun Pataleta
80d4981d8d Merge branch 'MDL-75401-master-integration' of https://github.com/ferranrecio/moodle 2022-10-20 18:31:00 +08:00
Jun Pataleta
6875318513 Merge branch 'MDL-59458-master' of https://github.com/laurentdavid/moodle 2022-10-20 13:57:40 +08:00
Ferran Recio
ed4dcf6dff MDL-75211 mod_data: show batch select only if delcheck is present 2022-10-19 17:05:29 +02:00
Ferran Recio
8305c1c74d MDL-75401 mod_data: add sticky footers 2022-10-19 14:51:10 +02:00
Laurent David
e861d7b0ad MDL-75664 mod_data: Approval status in database entries
* Add approval status in the default template.
* Change the language string for unapproved entries.
2022-10-17 09:55:11 +02:00
Amaia Anabitarte
80a627294a MDL-75140 mod_data: Tests to cover skipping mapping workflow 2022-10-11 11:00:26 +02:00
Jun Pataleta
ecb9a7e661 Merge branch 'MDL-75234-master' of https://github.com/ferranrecio/moodle 2022-10-04 11:59:57 +08:00
Ferran Recio
64c07858b0 MDL-75234 mod_data: add default templates behats
Most behats access the templates page just to autocreate the default
templates. This is not needed anymore and most behats can be optimized.
2022-10-03 15:58:28 +02:00
Ferran Recio
2a0991113b MDL-75234 mod_data: load default templates when empty
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.
2022-10-03 15:58:28 +02:00
Sara Arjona
6277853eb3 MDL-75276 mod_data: Update default 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.
2022-10-03 09:09:45 +02:00
Jun Pataleta
359e7c7ca4 Merge branch 'MDL-75186-master' of https://github.com/sarjona/moodle 2022-09-19 12:01:53 +08:00
Sara Arjona
a66cdcd9a8 MDL-75186 mod_data: Export saved presets 2022-09-16 11:12:14 +02:00
Ferran Recio
2b48b29c86 MDL-75149 mod_data: add preview to presets 2022-09-14 12:30:13 +02:00
Jun Pataleta
adba94a873 Merge branch 'MDL-75553-master' of https://github.com/junpataleta/moodle 2022-09-07 12:59:42 +08:00