997 Commits

Author SHA1 Message Date
Srdjan
3491ea1650 MDL-70975 task: Support for running adhoc tasks filtered by class
* CLI adhoc_task.php: new option --classname
* core\task\manager::get_next_adhoc_task(): new param $classname
  for filtering tasks
2023-04-05 11:00:46 +10:00
Andrew Nicols
e0acbbc6ea MDL-77693 core: Check the start time of a cron run when fetching tasks
When fetching the list of tasks to run, we were using the _process_
start time as a base. The various task fetchers (adhoc and scheduled)
only fetch tasks which were due to run _before_ this time.

With the new keepalive setting, we need to pass both the process start
time, and the run start time. We need to use the process start time to
determine whether MUC caches have been cleared since the process
started. but the run start time to fetch recent runs.
2023-03-30 11:35:59 +08:00
Jun Pataleta
3ecaf6362b MDL-77105 core: Add upgrade.txt notes 2023-03-27 13:58:24 +08:00
Paul Holden
2aeaa9e4b3
Merge branch 'MDL-77714' of https://github.com/stronk7/moodle 2023-03-23 17:00:09 +00:00
Eloy Lafuente (stronk7)
9a344c8967 MDL-77714 general: Remove Travis CI integration from core
Agreed @ MDLSITE-7135, this completely removes the Travis CI
integration with a note in the lib/upgrade.txt file, pointing
to the currently supported GHA alternative.
2023-03-22 19:04:54 +01:00
Shamim Rezaie
02471ef1cd MDL-76246 core_grades: Remove url param from ws 2023-03-22 20:59:14 +11:00
Ilya Tregubov
f4891b1034 Merge branch 'MDL-69882' of https://github.com/paulholden/moodle 2023-03-17 13:04:33 +01:00
Jake Dallimore
576369bf97 Merge branch 'MDL-77186-master' of https://github.com/andrewnicols/moodle 2023-03-15 12:00:42 +08:00
Ilya Tregubov
a34dbbe6fe Merge branch 'MDL-68093_master' of https://github.com/marxjohnson/moodle 2023-03-15 10:19:07 +08:00
Mark Johnson
958da5b67e MDL-68093 groups: Add visibility and participation settings
These new settings are designed to enchance user privacy surrounding
groups. They allow groups to be configured so that users outside the
group cannot see the group, so that users in the group cannot see each
other, or so that users cannot see the group at all, even if they are in
it. This avoids issues where a group may be assigned based on sensitive
personal information (such as a person requiring special arrangements
due to a disability).

By default, groups are visible to all and available for participation in
activities, which maintains the current behaviour.

For performance, a new cache has been added to track the number of
groups on a course that are not visible to non-members. This allows us
to revert to the existing behaviour if the new features are not being
used at all on a course, and only apply the new visibility conditions if
they are.

Users who have the moodle/course:viewhiddengroups capability should be
concious of exposing hidden groups when showing their screen to other
users. The "Switch role to..." feature can be used to show a course page
on screen without exposing private availability conditions, for example.

The changes cover several specific areas:
* grouplib functions, which most code should use to get lists of groups
  and members (this includes the participants page).
* Activities supporting group overrides will not allow overrides for
  groups that are hidden from all users.
* Activities supporting separate/visible groups modes will only allow
  groups with the new "participation" flag enabled to be selected.
* Group messaging will be disabled for groups where members cannot see
  each other, or cannot see the group at all.
2023-03-14 08:52:25 +00:00
Andrew Nicols
209cfe461d MDL-77186 core: Add upgrade note about core\cron migration 2023-03-14 11:19:03 +08:00
Paul Holden
6b6e7eaad2
MDL-69882 phpunit: final removal of deprecated 310 helper methods. 2023-03-13 17:46:44 +00:00
Sara Arjona
f0a20c0a76 MDL-76802 core: Create a grunt task to get upgradable libs
A new grunt task, upgradablelibs, has been added in order to get the
list of libraries that have a newer version in their repositories.

Co-author: Andrew Lyons <andrew@moodle.com>
2023-03-13 11:53:23 +01:00
Ilya Tregubov
58fb00eb18 Merge branch 'MDL-77308-master' of https://github.com/andrewnicols/moodle 2023-03-09 17:02:07 +08:00
Jun Pataleta
8441270181 Merge branch 'MDL-77559-master-2' of https://github.com/andrewnicols/moodle 2023-03-09 16:02:01 +08:00
Andrew Nicols
f58a71baab MDL-77308 core: Remove editor_tiny from core 2023-03-09 15:28:35 +08:00
Andrew Nicols
dde8111811 MDL-77559 js: Revert "MDL-75012 js: Drop support for modules built pre-babel"
This reverts commit 84c650489ab097771b50e6c63d26ffdd001db037.
2023-03-09 08:20:53 +08:00
Andrew Nicols
805d34f8c4 MDL-77559 js: Revert "MDL-75012 core: Fix upgrade.txt conflicts"
This reverts commit 8ce226081c54d5113b2771f148035e45b0772ed1.
2023-03-09 08:20:42 +08:00
Mathew May
fce2e17633 MDL-52805 core: Add debugging for old event functions 2023-03-07 11:10:02 +08:00
Jun Pataleta
8ce226081c MDL-75012 core: Fix upgrade.txt conflicts 2023-03-02 12:57:28 +08:00
Jun Pataleta
916503658d Merge branch 'MDL-75012-master-5' of https://github.com/andrewnicols/moodle 2023-03-02 12:34:34 +08:00
Jun Pataleta
724f8b8cb9 Merge branch 'MDL-75719-master-4' of https://github.com/ilyatregubov/moodle 2023-03-02 12:03:19 +08:00
Andrew Nicols
84c650489a MDL-75012 js: Drop support for modules built pre-babel
We now include more polyfills than we have ever done, and some of these
cause false-positives on our code to address modules which do not have a
name.

We started adding module names to modules in Moodle 3.8 at _build_ time
and kept support for modules which were not transpiled using Babel
before that point.

We no longer need to support this as all pre-3.8 Moodle versions are
long out of support. The most recent to go out of support was Moodle
3.5, which went completely out of support in May 2021.

We should not support code written and minified without a transpilation
phase from this time any longer.
2023-03-02 11:55:31 +08:00
Ilya Tregubov
fbb01b4724 MDL-75719 completion: Fix completion state for hidden grade items.
For hidden grade items we used to mark students as completed if
they have any grade. But this was not working correctly when we
also set pass grade for activity and completion criteria based
on pass grade. So we will have these completion states

Competion criteria 'Receive grade':
No grade - COMPLETION_INCOMPLETE
Grade visible, achieved passing grade - COMPLETION_COMPLETE_PASS
Grade visible, failed passing grade - COMPLETION_COMPLETE_FAIL
Grade hidden - COMPLETION_COMPLETE

Completion criteris 'Receive passing grade'
No grade - COMPLETION_INCOMPLETE
Grade visible, achieved passing grade - COMPLETION_COMPLETE_PASS
Grade visible, failed passing grade - COMPLETION_COMPLETE_FAIL
Grade hidden, achieved passing grade - COMPLETION_COMPLETE_PASS
Grade hidden, failed passing grade - COMPLETION_COMPLETE_FAIL_HIDDEN
2023-03-02 11:03:02 +08:00
Andrew Nicols
b517dc7c88 Merge branch 'MDL-77150' of https://github.com/roland04/moodle 2023-03-02 10:46:49 +08:00
Mikel Martín
86311f5a40 MDL-77150 core_table: Fix classes added as columnsattributes are ignored
Fix columnattributes with key 'class' being ingored by adding them to every 'column_class'.
2023-02-28 16:19:19 +01:00
Amaia Anabitarte
b37fe9a088 MDL-76990 core_course: Recover move right/left functionality 2023-02-27 18:27:57 +01:00
Andrew Nicols
a95f9fc1fb Merge branch 'MDL-69838' of https://github.com/paulholden/moodle 2023-02-23 10:39:42 +08:00
Ilya Tregubov
4145046020 Merge branch 'MDL-76848-master' of https://github.com/ferranrecio/moodle 2023-02-21 17:36:32 +08:00
Ilya Tregubov
414d3cdd5f Merge branch 'MDL-68347-master-2' of https://github.com/marinaglancy/moodle 2023-02-21 10:06:39 +08:00
Marina Glancy
c184b2d284 MDL-68347 course: trigger event if user was created during restore 2023-02-20 10:20:00 +00:00
Thong Bui
5db011a600 MDL-76797 core_role: Add create role event class 2023-02-20 12:37:35 +07:00
Ferran Recio
b1ad8480fe MDL-76848 core: add disable buttons to modals 2023-02-17 10:07:32 +01:00
Jun Pataleta
9b4e8fa082 Merge branch 'MDL-77171-master' of https://github.com/andrewnicols/moodle 2023-02-15 11:22:56 +08:00
Paul Holden
889f35fc26 MDL-69838 core: final removal of deprecated 310 methods. 2023-02-10 11:20:00 +00:00
Andrew Nicols
43962ec9ce Merge branch 'MDL-72559-master' of https://github.com/keevan/moodle 2023-02-09 10:17:12 +08:00
Andrew Nicols
41ccc8acb9 MDL-77171 core: Remove legacy tooltip/popuphelp YUI mods 2023-02-07 23:52:01 +08:00
Andrew Nicols
7ceb00f887 Merge branch 'MDL-75085-master-4' of https://github.com/junpataleta/moodle 2023-02-02 12:02:26 +08:00
Jun Pataleta
60fe64d786 MDL-75085 core_external: Validate $required param
Make sure that the $required param for external_description and its
subclasses are either VALUE_DEFAULT, VALUE_REQUIRED, or VALUE_OPTIONAL.
2023-02-02 09:13:43 +08:00
Andrew Nicols
2b6224a345 Merge branch 'MDL-75945-master' of https://github.com/meirzamoodle/moodle 2023-01-31 22:12:16 +08:00
Meirza
bf3a9c3b3f MDL-75945 core: Convert a floating value to an integer.
In PHP 8.1, any implicit conversion of float to int, which leads to a loss in precision, is now deprecated.
To avoid the error warning, the code must explicitly convert a floating value to an integer.
2023-01-24 16:49:10 +07:00
Laurent David
377c962f11 MDL-75337 core: Single button - API changes
* Update component library for new features of single_button and modal
    * Update core_notification javascript
2023-01-23 13:45:21 +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
3e1920966c MDL-76583 core_external: Note deprecations and renames 2023-01-19 07:34:00 +08:00
Sara Arjona
574f68f014 Merge branch 'MDL-76219-master' of https://github.com/meirzamoodle/moodle 2023-01-16 16:45:00 +01:00
Kevin Pham
0072559aa7
MDL-72559 cache: core/plugin_functions cache can be local
Co-Authored-By: Tim Hunt <T.J.Hunt@open.ac.uk>
2023-01-16 16:29:48 +11: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
e0d857f39f Merge branch 'MDL-76649' of https://github.com/timhunt/moodle 2023-01-12 12:06:35 +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
Tim Hunt
192f993906 MDL-76649 quiz statistics task: output more useful trace info
At the moment, quiz_statistics\task\recalculate gives no useful
information about what it is doing, which makes it hard to investigate
if the task fails. This commit makes it more usefully verbose.

Also, following this change, one instance of this task will not
run for more than one hour at a time.

As part of this commit, I have added a new helper mtrace_exception.
to consistently log exceptions in scheduled tasks. It is sad to
add a new function to moodlelib.php, but that seemed the logical place.
Looking at other tasks, this method is badly needed. Many are just
logging the ->getMessage() which is normaly insufficient for proper
debugging. However, swiching all existing tasks to use the new function
will need to wait for a future MDL.
2023-01-09 13:26:41 +00:00