Commit Graph

275 Commits

Author SHA1 Message Date
Angelia Dela Cruz 261a39d8e2 MDL-79768 fix: Fixed random failing Behat due to time difference 2023-10-26 18:09:16 +08:00
Angelia Dela Cruz 46f31447f2 MDL-79768 mod_data: Test for student can see upcoming data activity 2023-10-23 08:52:19 +08:00
Amaia Anabitarte b87b72195c MDL-78527 core_completion: Fixing tests 2023-09-12 15:43:49 +02:00
Andrew Nicols 2b19f23665 Merge branch 'MDL-78158-master' of https://github.com/andelacruz/moodle 2023-07-05 10:23:32 +08:00
Angelia Dela Cruz 09d654b3fe MDL-78158 behat: Behat cleanup and optimisation 2023-07-04 07:01:27 +08:00
Angelia Dela Cruz 9f101a30b2 MDL-78158 Behat: Use data generators to add blocks 2023-07-03 17:41:21 +08:00
Philipp Memmel fc13869f5a MDL-40084 mod_data: Rename and move entries ex-/importer classes
Also:
- Extend test coverage
- Small bug fixes
- Codestyle
2023-07-01 20:42:01 +02:00
Philipp Memmel cf2c91dae2 MDL-40084 mod_data: Add file import support
Co-authored-by: Stefan Hanauska <stefan.hanauska@csg-in.de>
2023-06-29 19:18:15 +02:00
Philipp Memmel 4003751163 MDL-40084 mod_data: Add file export support 2023-06-29 19:18:15 +02:00
Philipp Memmel 1296a2b868 MDL-40084 mod_data: Refactor importing data
Function data_import_csv has been deprecated.
2023-06-29 19:18:14 +02:00
Philipp Memmel bdf02ec088 MDL-40084 mod_data: Refactor exporting data
Functions data_export_csv, data_export_ods, data_get_exportdata have been deprecated.
2023-06-29 19:18:14 +02:00
Amaia Anabitarte cb50c71245 MDL-76715 mod_data: Remove data_records when the last field is deleted 2023-06-13 10:52:56 +02:00
David Castro 5d9fec141d MDL-77791 data: Fix file attachment to search doc 2023-04-25 19:51:44 -05:00
Andrew Nicols 035d818dd3 MDL-76866 mod_data: Disable the HTML editor to insert partial HTML
This test is adding table rows into an HTML editor and, quite rightly,
is failing under TinyMCE.

This only worked under Atto because Atto does not perform any HTML
validation. A user would not actually be able to insert the template
content this way, and therefore the test is/was invalid.

This change disables the HTML editor before inserting the template
content, which resembles the actions of a real user.
2023-03-29 20:33:47 +08:00
Sara Arjona a15d363453 Merge branch 'MDL-77275-master' of https://github.com/laurentdavid/moodle 2023-03-17 13:03:31 +01:00
Mark Johnson 8932fe55e5 MDL-68093 data: Add behat tests for groups 2023-03-14 08:52:26 +00:00
Laurent David 301c56ae1d MDL-77275 mod_data: Template reset button changes
* Remove the reset button in the sticky footer (template page)
* Add the reset button action in the Action menu
2023-03-13 07:35:44 +01:00
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