Commit Graph

2380 Commits

Author SHA1 Message Date
Mihail Geshoski
3cf4dd206f MDL-75153 output: Fix the group option and label support in select_menu
The following commit fixes the current logic that is used to return the
selected option and take into account structures with group options.
Also, it adds a default value to the $labelattributes class property to
to fix the issues that occur then the label is not explicitely set by
set_label().
2022-09-20 00:17:55 +08:00
Jun Pataleta
46849455be Merge branch 'MDL-75714' of https://github.com/stronk7/moodle 2022-09-15 09:24:50 +08:00
Stefan Hanauska
8e371f138a MDL-75714 navigation: Check if node is false 2022-09-14 23:35:15 +02:00
Víctor Déniz
e6fd69fae9 Merge branch 'MDL-75369-master' of https://github.com/sammarshallou/moodle 2022-09-14 19:50:56 +01:00
Sara Arjona
c739cc14af Merge branch 'MDL-75413-master' of https://github.com/sarjona/moodle 2022-09-14 18:04:51 +02:00
Sara Arjona
aa020451c7 MDL-75413 mod_data: Add resources preset 2022-09-14 13:12:41 +02:00
Sara Arjona
33277f99f1 Merge branch 'MDL-74010' of https://github.com/paulholden/moodle 2022-09-14 11:41:42 +02:00
Jun Pataleta
402136ef80 Merge branch 'MDL-75308' of https://github.com/paulholden/moodle 2022-09-14 05:33:09 +08:00
sam marshall
4ab9f08ce0 MDL-75369 Redis: Remove unnecessary ping after connect
The Redis cache store and session handler both do a 'ping()' after
connecting to Redis. This is unnecessary because the connect() call
has just checked the network connection and it's hardly likely that
the server has gone down since then.

According to my profiling, both connect() and ping() take
measurable time when talking to a separate server, i.e. a few
milliseconds. So it's not the case that connect() doesn't really
talk to the server, as I initially wondered.

If using Redis on a separate (non-localhost) server for both session
and cache store, removing these ping calls can save a millisecond
or two per request.
2022-09-13 10:45:00 +01:00
Paul Holden
da42ba79d6 MDL-75637 core: add journal database preset to standard plugin list. 2022-09-09 12:32:03 +01:00
Jun Pataleta
1e72b15971 Merge branch 'MDL-75411-master' of https://github.com/sarjona/moodle 2022-09-07 13:51:42 +08: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
Ilya Tregubov
c9a108973e Merge branch 'MDL-75155-master' of https://github.com/rezaies/moodle 2022-09-06 15:44:09 +04:00
Shamim Rezaie
2702885257 MDL-75155 output: A single-select combobox widget output component 2022-09-06 13:38:28 +10:00
Ilya Tregubov
e79b771a9b Merge branch 'MDL-75171_master' of https://github.com/TomoTsuyuki/moodle 2022-09-05 12:26:24 +04:00
Ilya Tregubov
2dffdc276f Merge branch 'MDL-74901-master' of https://github.com/snake/moodle 2022-08-31 16:00:50 +04:00
Paul Holden
91ae2c25b4 MDL-75308 task: explicit check for tasks of disabled plugins.
The enabled state of a plugin is a tri-state value (boolean or
null). We should be consistent with elsewhere by only considering
boolean false as an actually disabled plugin.

See also cdcb53a1 for similar change in task management.
2022-08-30 13:04:06 +01:00
Tomo Tsuyuki
a6a7b16846 MDL-75171 Auth: extend user logged in event
Co-authored-by: Heena Agheda <heenaagheda@catalyst-au.net>
2022-08-19 18:38:59 +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
Paul Holden
a65476d590 MDL-74010 core: check defined MDL_PERF* values in conditionals. 2022-08-05 11:02:54 +01:00
Jake Dallimore
c3aae36612 MDL-74901 core_navigation: support callbacks in frontpage secondary nav
Fixes the site home secondary nav, so that nodes added by plugins
implementing the PLUGIN_extend_navigation_frontpage callback can be
displayed for users who don't have the 'course:update' capability.
This change comprises:
- Removed course:update capability checks from site home (index.php)
and from the secondary nav view. This isn't needed since the nav is
capability aware.
- Fixed the initialisation of the secondary nav for the frontpage
course, removing erroneous duplicate 'home' nodes. The nav is now only
shown if there are nodes to display.
2022-07-25 15:06:14 +08:00
Paul Holden
d0b5241786 MDL-75256 task: move abstract get_name method to base class.
Allow adhoc tasks to implement this method, so they too can have
descriptive names for themselves. Default implementation added to
return the class name itself.
2022-07-22 09:13:53 +01:00
Víctor Déniz
fc3bb1dc50 Merge branch 'MDL-74857-dev' of https://github.com/izendegi/moodle 2022-07-20 21:03:24 +01:00
Iñigo Zendegi
919ea1dde1 MDL-74857 language: Start using the 'statusok' string for status 2022-07-18 10:55:47 +02:00
Marty
7760c5de07 MDL-73332 mustache: Fix shortentext helper
In the docs, it claims you can provide length to
the shortentext template helper as a context variable.
In reality, that is not the case.
2022-07-14 09:36:14 -04:00
Andrew Nicols
eb7131f091 Merge branch 'MDL-74522-master' of https://github.com/devlionco/moodle 2022-06-30 10:47:34 +08:00
Andrew Nicols
ce7eee8e77 Merge branch 'MDL-72292-master' of https://github.com/lameze/moodle 2022-06-30 10:38:55 +08:00
Víctor Déniz
32a995faf2 Merge branch 'MDL-72885-master-2' of https://github.com/junpataleta/moodle 2022-06-29 19:03:00 +01:00
Cameron Ball
29df52af19 MDL-74548 backup: Refactor course copies
This patch modifies the way copy data is shared in order to mitigate potential race conditions
and ensure that the serialised controller stored in the DB is always in a valid state.

The restore controller is now considered the "source of truth" for all information about the
copy operation. Backup controllers can no longer contain information about course copies.

As copy creation is not atomic, it is still possible for copy controllers to become orphaned or
exist in an invalid state. To mitigate this the backup cleanup task has been modified to call
a new helper method copy_helper::cleanup_orphaned_copy_controllers.

Summary of changes in this patch:

    - Copy data must now be passed through the restore controller's constructor
    - base_controller::get_copy has been deprecated in favour of restore_controller::get_copy
    - base_controller::set_copy has been deprecated without replacement
    - core_backup\copy\copy has been deprecated, use copy_helper.class.php's copy_helper instead
    - backup_cleanup_task will now clean up orphaned controllers from copy operations that went awry

Thanks to Peter Burnett for assiting with testing this patch.
2022-06-29 09:13:29 +08:00
Simey Lameze
b20cca2690 MDL-72292 core: add param type and polishing 2022-06-17 09:50:38 +08:00
Alexander Bias
8583feb724 MDL-72292 core: Check if fulldir is set when loading renamed classes 2022-06-17 09:41:07 +08:00
Ilya Tregubov
85463a83f6 Merge branch 'MDL-73726' of https://github.com/paulholden/moodle 2022-06-15 14:36:16 +04:00
Ilya Tregubov
41cf7a58f1 MDL-73293 core_task: patch for undefined propety. 2022-06-15 11:31:31 +04:00
Ilya Tregubov
9932acd6b3 Merge branch 'MDL-73293-master' of https://github.com/cameron1729/moodle 2022-06-13 09:50:13 +04:00
Víctor Déniz
bff506ef6b Merge branch 'MDL-69970_master' of https://github.com/aya-saad1/moodle 2022-06-10 13:12:11 +02:00
Ilya Tregubov
bdd9ff353b Merge branch 'MDL-74192' of https://github.com/paulholden/moodle 2022-06-10 13:11:50 +02:00
Cameron Ball
cd1a7291ea MDL-73293 core_task: Cleanup stale adhoc task metadata 2022-06-09 14:15:37 +08:00
Alexey
25b5125187 MDL-74522 lib/classes/navigation fix Navbar My courses data-key value 2022-06-07 16:29:31 +03:00
Paul Holden
473ac1285e MDL-73726 dataformat: obey sort order when returning enabled plugins. 2022-06-06 09:32:36 +01:00
aya.saad
8636718cee MDL-69970 icons: flip help icon direction in RTL languages 2022-06-05 09:18:26 +02:00
Jun Pataleta
468de2da07 Merge branch 'MDL-73767-master_clever_oauth2' of https://github.com/rnathuji/moodle 2022-06-01 11:43:00 +08:00
Ripal Nathuji
79ae21c23f MDL-73767 oauth2: Add clever oauth2 client 2022-05-31 17:17:20 -05:00
Shamim Rezaie
bd8dbf4c21 Merge branch 'MDL-72723-select-exists-not-count' of https://github.com/keevan/moodle 2022-05-31 12:57:16 +10:00
Nathan Mares
1da1152baa MDL-72723 logs: Add get_events_select_exists to the sql_reader interface
- Updates to log stores and backup helper to improve performance when
  checking if a course has been modified.
- This is a breaking change as it adds a new function on the sql_reader
  interface.

Co-authored-by: Kevin Pham <keevan.pham@gmail.com>
2022-05-30 10:42:47 +10:00
Jun Pataleta
67da548b48 MDL-72885 output: Add lang attribute for language menu items 2022-05-27 23:39:08 +08:00
Jun Pataleta
d4ba0359cf MDL-72885 core: Use get_html_lang_attribute_value()
Use get_html_lang_attribute_value() for formatting language codes
for the HTML lang attribute.
2022-05-27 19:38:54 +08:00
Ilya Tregubov
0460147cb5 Merge branch 'MDL-67648-master' of https://github.com/cameron1729/moodle 2022-05-27 15:41:29 +06:00
Jun Pataleta
2814436c44 Merge branch 'MDL-71198-master' of https://github.com/junpataleta/moodle 2022-05-26 10:23:27 +08:00
Jun Pataleta
dac4af8e4c Merge branch 'MDL-73183-master' of https://github.com/andrewnicols/moodle 2022-05-26 10:09:46 +08:00
Peter Burnett
3801662e97 MDL-71198 backup: Change times on restore file duplication 2022-05-25 22:18:36 +08:00