Commit graph

1958 commits

Author SHA1 Message Date
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
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
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
Sujith Haridasan
73d604369d MDL-71062 core: Step 1 deprecation of print_error function 2022-07-13 08:20:54 +05:30
Eloy Lafuente (stronk7)
58b56e2395 MDL-71747 upgrade: remove all the < 3.9.0 upgrade steps
This just deletes all the upgrade steps previous to 3.9.0. Some
small adjustments, like tweaking globals can also be applied
when needed.

Also includes an upgrade step to prevent upgrading from any
version < 2020061500 (v3.9.0) as anti-cheating measure.

The next commits will proceed to deprecate / remove functions
that were exclusively (usually belonging to upgradelib) being
used by those, now removed, upgrade steps. This is the list
of code to remove and document in upgrade.txt files:

  - upgrade_analytics_fix_contextids_defaults()
  - upgrade_convert_hub_config_site_param_names()
  - upgrade_rename_prediction_actions_useful_incorrectly_flagged()
  - \mod_forum\task\refresh_forum_post_counts adhoc task.

And these is the code that has NOT been removed
because it may be needed later (no matter there aren't uses now):

  - \core_search\manager::clean_up_non_existing_area(), used by
  - \core\task\clean_up_deleted_search_area_task adhoc task
2022-07-07 19:16:37 +02:00
Jun Pataleta
f9af45eff5 Merge branch 'MDL-75058-master' of https://github.com/jleyva/moodle 2022-07-07 12:07:55 +08:00
Juan Leyva
51c9c709a9 MDL-75058 course: Fix support for dates on WebServices 2022-06-27 15:29:36 +02:00
Noel De Martin
df9f610d1d MDL-74220 data: Implement behat generators 2022-05-26 10:38:11 +02:00
Eloy Lafuente (stronk7)
76f5445451 MDL-74510 upgrade: add the 4.0.0 separation line to all upgrade scripts 2022-04-22 18:45:10 +02:00
Jun Pataleta
70f6b1605b MDL-74471 versions: bump all versions and requires near release 2022-04-13 10:37:36 +08:00
Ilya Tregubov
29da0c7f2a Merge branch 'MDL-74235-master-2' of https://github.com/andrewnicols/moodle 2022-04-07 12:06:38 +06:00
Andrew Nicols
4b388fc239 MDL-74235 core: Update core uses of activity icons to monologo 2022-04-07 12:56:14 +08:00
Andrew Nicols
eb0a95956f MDL-74235 mod: Rename activity icons to new monologo naming 2022-04-07 12:56:14 +08:00
Ilya Tregubov
e2a8a3cbf9 Merge branch 'MDL-74381-master' of https://github.com/aanabit/moodle 2022-04-06 15:37:42 +06:00
Amaia Anabitarte
8d8b8d9066 MDL-74381 core_themes: Resizing svg mod icons to 24px 2022-04-06 11:19:10 +02:00
Helen Foster
3719878cbf MDL-74330 lang: Import fixed English strings (en_fix) 2022-04-01 13:17:08 +01:00