551 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
361dfe8145
MDL-75952 general: Since php81, refection->setAccessible() is no-op
Refereces:
- https://wiki.php.net/rfc/make-reflection-setaccessible-no-op
- https://www.php.net/manual/en/reflectionproperty.setaccessible.php
- https://www.php.net/manual/en/reflectionmethod.setaccessible.php

As of PHP 8.1.0, calling this method has no effect; all methods are
invokable by default. So, let's remove all uses from core, they are
no-op.
2024-03-10 21:15:00 +01:00
Mikel Martín
d0d62fd06c MDL-75670 theme: Refactor form-inline helper class dropped in BS5
- Replace .form-inline Bootstrap helper class with .d-flex.flex-wrap.align-items-center
- Refactor .form-inline occurrences in SCSS files or remove when unneeded
2024-02-29 13:56:46 +01:00
Jun Pataleta
5672927c28
MDL-80131 mod_data: Make page titles unique 2023-12-02 07:19:16 +08:00
raortegar
d6b8dd892c
MDL-76034 mod_data: Add type definitions and return values
Type definitions and return values for methods get_field_class_name() and data_get_field()
2023-08-24 23:23:17 +08: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
Philipp Memmel
ab09cf2b84 MDL-40084 mod_data: Remove xls export, deprecate data_export_xls 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
Marina Glancy
8fc1486d36 MDL-77164 various: fix incorrect phpdocs 2023-04-13 11:35:06 +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
1f4794341b Merge branch 'MDL-75498-master' of https://github.com/ferranrecio/moodle 2023-01-31 15:13:33 +08:00
Ferran Recio
0213df2f03 MDL-75498 mod_data: add extra tags to templates 2023-01-30 12:01:20 +01:00
Amaia Anabitarte
a58ea07a41 MDL-76357 theme: Make sticky footer more prominent 2023-01-26 13:11:18 +01:00
Amaia Anabitarte
d4e66f1df5 MDL-76066 mod_data: Trigger field_deleted event when importing 2023-01-23 18:53:44 +01:00
Marina Glancy
b0a83aa7bd MDL-76362 various: Avoid passing nulls to functions that don't allow nulls
PHP 8.1 is more strict on the parameter type. Functions such as trim(), strlen(), str_replace(), etc
show notice when null is passed as an argument
2023-01-23 09:15:54 +08:00
Philipp Memmel
4f4fbea9c3 MDL-76525 mod_data: Add param validation for data fields 2023-01-18 12:09:07 +01: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
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
Sara Arjona
53c4fc9af0 MDL-75289 mod_data: Reorder secondary nav tabs
The Presets tab should be displayed before Fields and Templates.
2022-10-28 15:30:26 +02: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
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
de11a92ed0 Merge branch 'MDL-75497-master4' of https://github.com/raortegar/moodle 2022-10-20 17:29:11 +08:00
raortegar
bf5cd9cf98 MDL-75497 mod_data: Review Check existence of field.class.php 2022-10-20 09:14:48 +02: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
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
bc7caa3ac8 MDL-75140 mod_data: Skip mapping form if there is no field created 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
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
Ferran Recio
2b48b29c86 MDL-75149 mod_data: add preview to presets 2022-09-14 12:30:13 +02:00
Amaia Anabitarte
ae5dc809ec MDL-75187 mod_data: Move delete preset to a modal
Co-author: Ferran Recio <ferran@moodle.com>
2022-09-02 16:01:38 +02:00
Sara Arjona
cb4b6f125b MDL-75353 mod_data: always return str in data_generate_default_template
From now on, the data_generate_default_template method will always return
a string with the template content or an empty string when there is no
content available (for instance, when the database has no fields).
This method won't return a boolean anymore.
2022-08-19 08:42:15 +02:00
Laurent David
01c94bcb64 MDL-59458 mod_data: Fix sorting data query
* When activating sorting on a different field than the original field
the list of records is empty
2022-08-15 17:08:14 +02:00
Amaia Anabitarte
cb01747608 MDL-75137 mod_data: Add entry throws an exception if there is no field 2022-08-12 15:46:08 +02:00
Sara Arjona
aecb87f53e MDL-75142 mod_data: Add description to presets
This commit adds support to description field for presets:
- For plugin presets, description will be stored in the module_help
string in lang files.
- For saved presets, a new element, <description>, has been added
to the preset.xml file, to include this information.

A new field has been added to the "Save as preset" modal, to let users
define description (which is empty by default, to support pre-existing
presets that won't have it).

Apart from that, the "Save as preset" workflow has been slightly improved,
following the Product UX/UX suggestions to hide the checkbox to overwrite
the preset by default and show it only if the user tries to save a preset
with an existing name.
2022-08-05 14:51:49 +02:00
Sara Arjona
9d10f7d19e MDL-75148 mod_data: Add isplugin info to presets
This activity currently supports two different preset types:
- Datapreset plugins, that can be installed copying them to the
mod/data/preset folder.
- Presets saved manually by users.

This commit adds an attribute to the presets to mark them, in order
to identify them later (because, for instance, the plugins can't be
removed).

Apart from that, the methods in lib.php, involved with this issue, have
been deprecated. New methods have been implemented in the manager class,
covering them with PHPUnit tests.
2022-08-01 12:08:16 +02:00
Sara Arjona
bc9b915a32 MDL-75146 mod_data: Fix comments raised during int-review 2022-07-22 07:27:40 +02:00
Ferran Recio
776e48748f MDL-75146 mod_data: refactor template parser 2022-07-22 07:27:40 +02:00
Ferran Recio
e2da14bbb8 MDL-75146 mod_data: migrate templates editor to mustache 2022-07-22 07:27:40 +02:00
Ferran Recio
c6db008496 MDL-75146 mod_data: add a manager class 2022-07-22 07:27:40 +02:00
Sujith Haridasan
73d604369d MDL-71062 core: Step 1 deprecation of print_error function 2022-07-13 08:20:54 +05:30
Mihail Geshoski
4a9c83ac9e MDL-73532 navigation: Modify methods that extend the setting nav
Introduces some changes to the exising _extend_settings_navigation()
methods that utilize the global $PAGE object. In order to accomodate
the changes done for the secondary navigation for single activity
courses, the methods that extend the settings navigation can no longer
rely on the $PAGE object, instead the more reliabe way to obtain this
infomation is through the get_page() method from settings_navigation
class.
2022-02-14 09:40:27 +08:00
Mihail Geshoski
4cc2b15e51 MDL-73357 mod_data: Update tertiary navigation
The following commit disables the acivity header information in
pages where this information is not required, adds missing headings,
updates the breadcrumbs, repositions the groups selector in the
database view page.
2022-02-01 11:45:12 +08:00
Adrian Greeve
0a04ebde11 MDL-72930 navigation: Remove duplicated navigation boxes.
Some pages have settings that really aren't required anymore.
These have been removed and a function has been aded so that other
developers can turn off the navigation overflow if they want.
2022-01-04 15:58:52 +08:00
Bas Brands
f2ddd23ec1 MDL-71457 theme_boost: activity icon styling 2021-12-20 15:02:24 +01:00
Peter Dias
535bbed24e MDL-72413 data: Use the common module for setting the header 2021-12-13 09:49:34 +08:00
Mihail Geshoski
6470282e93 MDL-71913 mod_data: Add tertiary navigation 2021-10-13 11:05:29 +08:00