1821 Commits

Author SHA1 Message Date
Jun Pataleta
1e72b15971 Merge branch 'MDL-75411-master' of https://github.com/sarjona/moodle 2022-09-07 13:51:42 +08:00
Jun Pataleta
7608cd28a6 Merge branch 'MDL-75252-master' of https://github.com/sarjona/moodle 2022-09-07 13:28:35 +08:00
Jun Pataleta
adba94a873 Merge branch 'MDL-75553-master' of https://github.com/junpataleta/moodle 2022-09-07 12:59:42 +08:00
Jun Pataleta
e08c186ba3 MDL-75553 mod_data: Fix wording of data fields in Behat tests 2022-09-07 12:55:33 +08:00
David Mudrák
aa49eb24fb MDL-75553 lang: Fix Behat regressions in scenario files 2022-09-06 21:47:18 +02:00
Sara Arjona
f8c63f1dc6 MDL-75252 mod_data: Improve the Image gallery templates 2022-09-06 17:13:28 +02:00
Sara Arjona
63bdc84719 MDL-75411 mod_data: Add proposals preset
Co-author: Laurent David <laurent.david@moodle.com>
2022-09-06 17:04:41 +02:00
Sara Arjona
d235080a03 Merge branch 'MDL-75187-master' of https://github.com/sarjona/moodle 2022-09-06 06:39:58 +02:00
Jun Pataleta
2e67835f17 Merge branch 'MDL-75430-master' of https://github.com/raortegar/moodle 2022-09-05 09:37:13 +08:00
Helen Foster
7d2fada8b0 MDL-75553 lang: Import fixed English strings (en_fix) 2022-09-04 20:44:10 +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
3a6db56555 Merge branch 'MDL-75521-master' of https://github.com/aanabit/moodle 2022-08-31 15:48:33 +02:00
Sara Arjona
f2aafd12c0 Merge branch 'MDL-75412-master' of https://github.com/sarjona/moodle 2022-08-31 12:00:54 +02:00
Sara Arjona
3ea96df0e1 Merge branch 'MDL-75564-master' of https://github.com/aanabit/moodle 2022-08-30 07:02:42 +02:00
Jun Pataleta
4f03f60804 Merge branch 'MDL-75353-master' of https://github.com/sarjona/moodle 2022-08-29 13:10:20 +08:00
Shamim Rezaie
ce2c78251f Merge branch 'MDL-75275-master' of https://github.com/sarjona/moodle 2022-08-28 23:39:47 +10:00
Amaia Anabitarte
7d7c2ce8f2 MDL-75564 mod_data: Remove underconstruction_title string 2022-08-26 15:56:05 +02:00
Sara Arjona
89eed9e368 MDL-75412 mod_data: Add journal preset 2022-08-25 08:24:02 +02:00
Amaia Anabitarte
9eee0f7dac MDL-75521 mod_data: Use moodle_url on mod/data/view.php for baseurl 2022-08-24 18:21:35 +02:00
Sara Arjona
680bff5f40 MDL-75143 mod_data: Use standard notification for Save as preset
Apart from using the standard notification, the message has been
replaced to the one suggested by the Product UX team.
2022-08-22 12:46:11 +02:00
Sara Arjona
757759a879 MDL-75143 mod_data: Edit presets 2022-08-22 12:46:11 +02:00
Sara Arjona
beb305198d MDL-75143 mod_data: Add user support to preset behat generator
The 'user' parameter has been added to the 'mod_data > presets'
generator, to let define the author of the preset.
When it's not defined, admin is used as the author.
2022-08-22 11:07:28 +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
Sara Arjona
2acda39537 MDL-75275 mod_data: Add ##actionsmenu## action tag 2022-08-19 08:38:33 +02:00
Sara Arjona
fd1b874449 MDL-75275 mod_data: Add user support to entry behat generator
The 'user' parameter has been added to the 'mod_data > entries'
generator, to let define the author of the entry.
When it's not defined, admin is used as the author.
2022-08-19 08:38:32 +02:00
Andrew Nicols
903f04a320 Merge branch 'MDL-74608' of https://github.com/timhunt/moodle 2022-08-18 10:52:02 +08:00
Sara Arjona
5a3b4ac828 Merge branch 'MDL-75390-master' of https://github.com/sarjona/moodle 2022-08-17 17:08:17 +02:00
Shamim Rezaie
e07a3fecec Merge branch 'MDL-75414-master' of https://github.com/sarjona/moodle 2022-08-17 02:24:00 +10:00
Shamim Rezaie
14ff458b3d Merge branch 'MDL-49795-add-missing-keys-indexes-to-core-tables' of https://github.com/keevan/moodle 2022-08-17 02:17:52 +10:00
Tim Hunt
8babdbd396 MDL-74608 activities: a new option to force the activity language
For a long time, Moodle has had the feature to force the language
for a whole course. This change adds the same feature at activity
level.

The course-level feature was controlled by a capability
moodle/course:setforcedlanguage, and I decided to use the same
capability to control this feature. I think a new capability would be
overkill.
2022-08-15 22:15:52 +01:00
Amaia Anabitarte
e08458cc23 MDL-75137 mod_data: Fix and improve behat tests 2022-08-12 15:46:44 +02:00
Amaia Anabitarte
8768a7adb9 MDL-75137 mod_data: Redesign zero state page
Co-authored-by: Ferran Recio <ferran@moodle.com>
2022-08-12 15:46:44 +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
raortegar
21a8787e50 MDL-75430 mod_data: Fix picture size for list view
We were missing the templatename in get_template method of manager.php
2022-08-11 18:09:25 +02:00
Sara Arjona
9acdb178c7 MDL-75414 mod_data: Fix error when displaying fields in single view
This is a regression from MDL-75146, when the manager class was created.
The field class was not found in the Single view, because the field.class.php
file was not included (so the base class was used in all the cases for this
view). That's why the image field was displaying only the image name instead
of building the <img element or the URLs were displaying only the text, instead
of creating a link for them.
2022-08-10 12:52:59 +02:00
Sara Arjona
70d520e1a6 MDL-75390 mod_data: Fix regression when portfolios is enabled
This patch fixes a regression that is causing some errors when
portfolios advanced feature is enabled but no portfolio is
enabled.
2022-08-05 16:54:49 +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
Kevin Pham
5ab70be182 MDL-49795 mod_data: Add userid foreign key to data_records 2022-08-03 15:17:05 +10:00
Sara Arjona
599aca679b MDL-75148 mod_data: Improve presets list page
- Add a new help text.
- Add captions to table columns.
- Move action icons to action menu, and fix code to display the remove
action only for presets created by users.
- CSS improvements to fit the prototype.

In order to achive the previous points, the renderer has been improved,
to return the data and let the mustache to print it properly (instead of
returning the formatted HTML table).
2022-08-01 12:08:16 +02:00
Sara Arjona
06b86fdfc3 MDL-75148 mod_data: Enable Use preset button when one is selected
The 'Use preset' button will be enabled only when a preset is selected.
2022-08-01 12:08:16 +02:00
Sara Arjona
7d88bc0754 MDL-75148 mod_data: Move Import button to right
This commit moves the Import button from the tertiary navigation to
the right.
2022-08-01 12:08:16 +02:00
Sara Arjona
ad0595b4b4 MDL-75148 mod_data: Implement preset behat generator 2022-08-01 12:08:16 +02:00
Sara Arjona
13264c7107 MDL-75148 mod_data: Add create_preset to generator 2022-08-01 12:08:16 +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
abeae6acb2 MDL-75148 mod_data: Add missing template (adv search)
While covering is_directory_a_preset() with PHPUnit tests, it has been
identified that there was a missing file in the Image gallery preset.
The template will be reviewed in the future (in a separate issue) but,
for now, I'm going to add the default template for advanced search.
2022-08-01 11:34:24 +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
Jun Pataleta
3c6fdb1993 Merge branch 'MDL-71062-master' of https://github.com/sharidas/moodle 2022-07-13 11:39:08 +08:00