113 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
061c9d7ba0 MDL-77940 versions: bump all versions and requires near release
version = 2023042400 release version
requires= 2023041800 current rc1 version
2023-04-18 18:08:09 +02:00
Srdjan
85323070e7 MDL-70975 task: adhoctasks.php - queued ad hoc tasks report
Similar to scheduled tasks report

core\task\manager::adhoc_task_from_record() now raises moodle_exception
2023-04-05 11:29:46 +10:00
Andrew Nicols
9ec46c232d MDL-77186 core: Move all uses of cronlib to new class 2023-03-13 21:21:13 +08:00
Brendan Heywood
327d1ced40 MDL-77530 tool_task: Fix coding errors in longrunningtasks check 2023-03-10 11:28:45 +08:00
Brendan Heywood
653ad78f43 MDL-77530 tool_task: Fix coding errors in checks 2023-03-10 11:28:45 +08:00
Meirza
e2d5d50276 MDL-77336 admin: Added class properties that are not declared.
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-03-06 16:44:06 +07:00
Helen Foster
975a127325 MDL-76739 lang: Import fixed English strings (en_fix) 2023-01-12 09:17:27 +08:00
Sara Arjona
0b733266b0 Merge branch 'MDL-72775-master' of https://github.com/QihuiChan/moodle 2022-12-27 16:12:50 +01:00
Qihui Chan
791e56d3bc MDL-72775 tool_task: check long running tasks 2022-12-23 09:41:05 +10:00
Jun Pataleta
00bae8b8a4 MDL-76403 versions: bump all versions and requires near release 2022-11-23 09:45:23 +08: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
Sujith Haridasan
73d604369d MDL-71062 core: Step 1 deprecation of print_error function 2022-07-13 08:20:54 +05:30
Daniel Ziegenberg
e2d788f617
MDL-63594 core: Final deprecation of CLI script from admin/tool/task/cli
Following MDL-63580 this now finally deprecates and removes the class
\tool_task\run_from_cli, please use \core\task\manager.

Following MDL-63580 this now finally deprecates and removes
 - admin/tool/task/cli/schedule_task.php, use admin/cli/scheduled_task.php
 - admin/tool/task/cli/adhoc_task.php, use admin/cli/adhoc_task.php

Also mentions and references to the old CLI scripts are updated to
point to the new counterparts.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2022-06-08 10:55:30 +02:00
Eloy Lafuente (stronk7)
9f53b0e965 MDL-73971 phpunit: Move more tests to use correct names and namespaces
Applied the following changes to various testcase classes:

- Namespaced with component[\level2-API]
- Moved to level2-API subdirectory when required.
- Fixed incorrect use statements with leading backslash.
- Remove file phpdoc block
- Remove MOODLE_INTERNAL if not needed.
- Changed code to point to global scope when needed.
- Fix some relative paths and comments here and there.
- All them passing individually.
- Complete runs passing too.

Special mention to:

- Some fixtures, initially defined in the test files have been
  moved to new files in fixtures subdirectory, leaving the unit
  test files clearer:
  - moodle2_course_format_test.php
- Rename wrong named test:
  - baseoptiogroup_test = baseoptigroup_test
2022-05-06 18:29:11 +02:00
Jun Pataleta
70f6b1605b MDL-74471 versions: bump all versions and requires near release 2022-04-13 10:37:36 +08:00
Sujith Haridasan
aa1c2e2382 MDL-73848 administration: Fix the breadcrumbs and nav highlights
Create or update the breadcrumbs in the site administration
pages where it is required.
Highlight the corresponding site adminstration tab.
Highlight the primary nav to Site administration when user
is navigating to any of the site administration pages.

Also changed the boostnavbar so that the nodes in the secondary
navigation are not shown in the breadcrumbs when user is in site
administration page.
2022-03-25 17:44:47 +08:00
Eloy Lafuente (stronk7)
337e740568 Merge branch 'MDL-74141-master' of https://github.com/sarjona/moodle 2022-03-15 23:38:14 +01:00
Sara Arjona
730bc8735e MDL-74141 tool_task: Display error when Path to CLI not defined
When "Path to PHP CLI" is not defined, an exception with the message
in cannotfindthepathtothecli should be displayed, and the page should
be redirected to System paths settings page.

Apart from that, this patch also replaced core_task to tool_task,
because this message wasn't traslated properly.
2022-03-10 16:19:07 +01:00
Daniel Ziegenberg
a4d64bd71b
MDL-73923 tool_task: make a more relaxed check on cron run interval
Prior to this change, the tool_task_cronrunning check had very tight
limits for checking the last cron interval and comparing it to the
expected frequency. When a cron job should take 1:00 min and the last
run was 1:02 min it complained that there was 1:02 between the last two
runs of the cron maintenance script and it should run every 1:00.

This change makes the check a bit more relaxed and adds an additional
minute on top of the expectedfrequency to give the cron job some time.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2022-03-03 14:27:32 +01:00
Andrew Nicols
f66210dece Merge branch 'MDL-72734' of https://github.com/paulholden/moodle 2022-02-18 10:55:48 +08:00
Jordi Pujol Ahulló
21f73b29c1 MDL-69764 tool_task: unify crontab verification
Use scheduled_task crontab field verification in
admin/tool/task to unify how Moodle deals with
crontab definition and its verification.
This helps remove duplicated code and fix
crontab definition not allowed in the web form,
but actually was valid.

Updated crontab fields precision on task_scheduled
table to have enough room for the worst case:
all possible different values separated by comma.
2022-02-17 13:24:31 +01:00
Paul Holden
a6b13214a9 MDL-72734 tool_task: consistent checks for running tasks from web. 2022-02-14 09:22:01 +00:00
Paul Holden
d12eb4943b MDL-72467 tool_task: improve cron status check details. 2021-09-02 17:32:19 +01:00
Paul Holden
75e72a2b24 MDL-71844 tool_task: preserve navigation when executing task. 2021-08-09 10:44:45 +01:00
Mikel Martín
f874652ad2 MDL-71152 theme_boost: Use 'scroll-margin-top' for anchor links
Current anchor link offset fix is not working with 'display:flex' elements
2021-07-16 11:56:31 +02:00
Jordi Pujol Ahulló
9c4510a358 MDL-70230 admin: add setting sched. task status
When defining settings that are used by scheduled tasks,
it is also useful, or even needed, to know the status
of that scheduled task to have the whole big picture of
that part of the system.

Based on the admin_setting_description, this new setting
reports its name, its status, a link to the configuration.

When adding a new setting of this type, the user can add
an extra description field to complete the whole meaning.
2021-06-04 08:12:16 +02:00
Eloy Lafuente (stronk7)
9d6aa39985 MDL-71583 versions: Add all the missing full-stops to version/requires
It seems that the new phpcs3 checker is now controlling those
line comments that previously were ignored.

This commit just looks for all the cases and bulk-add
them when needed. The bash script (mac) used to add all them is:

while read -r line; do
    arr=(${line//:/ })
    if [[ -n ${arr[0]} ]] && [[ -n ${arr[1]} ]]; then
        echo "  file ${arr[0]}, line ${arr[1]}"
        sed -i "${arr[1]}s/\$/\./" ${arr[0]}
    fi
done < <(find . -name version.php | xargs ag --nomultiline '>(version|requires) *=.*//.*[^;\.]$')
2021-05-11 20:11:07 +02:00
Sara Arjona
8f4ff3014d Merge branch 'MDL-68010-cron-run-disabled' of https://github.com/brendanheywood/moodle 2021-01-13 11:28:10 +01:00
Brendan Heywood
75d5debe54 MDL-68010 tool_task: Allow disable tasks to still be run manually 2020-12-15 16:59:47 +11:00
Brendan Heywood
71f180447a MDL-68768 tool_tasks: Check for failing adhoc tasks 2020-12-15 12:49:00 +11:00
Adrian Greeve
a0ba1ae381 Merge branch 'MDL-65843-task-overrides' of https://github.com/jamie-catalyst/moodle 2020-11-19 11:29:01 +08:00
Jamie Stamp
3a232840a5 MDL-65843 tasks: Allow schedules to be overridden in config 2020-11-18 12:44:05 +00:00
Brendan Heywood
2481b041ce MDL-70107 tool_task: Unlock session on long running tasks in UI 2020-11-16 15:42:25 +11:00
David Mudrák
e576fef1fa MDL-69998 lang: Fix reworded strings in Behat test scenarios 2020-10-27 11:32:10 +01:00
Helen Foster
dd7a1d60e2 MDL-69998 lang: Import fixed English strings (en_fix) 2020-10-27 11:32:10 +01:00
Eloy Lafuente (stronk7)
432b9a9075 MDL-69521 core: Move all comments in code from 4.3 to 4.1 2020-09-08 18:59:46 +02:00
Mikhail Golenkov
d7342dc239 MDL-67211 Tasks: Add cron_enabled setting.
Co-authored-by: Sam Marshall <s.marshall@open.ac.uk>
2020-08-25 17:08:57 +10:00
Mikhail Golenkov
45875f6f7b MDL-67211 Tasks: Front-end to display currently running tasks.
Co-authored-by: Sam Marshall <s.marshall@open.ac.uk>
2020-08-25 17:08:47 +10:00
Mikhail Golenkov
b465a541ae MDL-67211 Tasks: Record when a task is running.
Co-authored-by: Sam Marshall <s.marshall@open.ac.uk>
2020-08-25 17:08:03 +10:00
Eloy Lafuente (stronk7)
fbb0767536 MDL-69475 versions: bump all versions and requires in master
version = 2021052500 release version
requires= 2021052500 same than version

Why 20210525? (25th May 2021) ?

Because master is going to be Moodle 4.0, to be released
on November 2021. And, until then, we are going to have
a couple of "intermediate" releases:

- Moodle 3.10 to be released 9th November 2020. (2020110900)

  This version will be using versions from today to 2020110900
  (once it's released the YYYYMMDD part stops advancing).

- Moodle 3.11 to be released 10th May 2021. (2021051000)

  This version will be using versions from 3.10 release to 2021051000
  (once it's released the YYYYMMDD part stops advancing).

That means that all versions from today to 2021051000 are going
to be used by those 2 "intermediate" releases (3.10 and 3.11).

And we cannot use them in master, because it's forbidden to have
any overlapping of versions between branches (or different upgrade
paths will fail).

So, get that 2021051000, let's add it a couple of weeks to cover
the on-sync period (or a 2 weeks delay max!) and, the first version
that master can "own" in exclusive (without any overlap) is, exactly,
25th May 2021, hence our 20210525.
2020-08-18 00:47:15 +02:00
David Mudrák
cdcb53a114 MDL-69099 tasks: Do not mark the non-enabled plugin's task as disabled
The `core\plugininfo\base::is_enabled()` uses three-state logic for its
return value. It can return null as a valid value as per its
documentation. We need to test for the explicit false value in this
case.

To make the attached Behat test able to identify the table, the caption
is added. It seems to be helpful for all users so I leave it displayed
without using the accesshide mechanism.
2020-06-22 17:23:10 +01:00
Eloy Lafuente (stronk7)
115cc0214f MDL-68973 versions: bump all versions and requires near release
version = 2020061500 release version
requires= 2020060900 current rc1 (week7roll1) version
2020-06-09 16:23:09 +02:00
Mathew May
329d3a8de5 MDL-68946 tool_task: Make clionly string handling more consistent 2020-06-08 17:11:57 +08:00
cescobedo
db15746c2d MDL-63580 core_task: Deprecation cron_run_single_task and run_from_cli
Also we have move the functions in \tool_task\run_from_cli to \core\task\manager
and we have deprecated that class.
2020-05-11 10:53:23 +02:00
cescobedo
079736ccb3 MDL-63580 core_task: Deprecation CLI scripts from admin/tool/task/cli
Copy the CLI scripts from admin/tool/task/cli to admin/cli (schedule_task.php and adhoc_task.php)
and rename to scheduled_task.php and to improve in order to use cron_run_inner_scheduled_task.
2020-05-11 10:53:17 +02:00
Helen Foster
1fce3f52ac MDL-68434 lang: Import fixed English strings (en_fix)
Significant string changes:

* pluginnamesummary,qtype_ddimageortext and
  pluginnamesummary,qtype_ddmarker - Note about the question type not
  being accessible to visually impaired users

* addresourceoractivity,core - Removing 'resource' as the new activity
  chooser doesn't have resource types separated
2020-04-28 14:01:20 +02:00
Andrew Nicols
986bf4e988 MDL-68405 behat: Fix gherkinlint failures 2020-04-14 15:09:13 +08:00
Andrew Nicols
aae4b15631 Merge branch 'MDL-47271-status-api-fixes' of https://github.com/brendanheywood/moodle 2020-04-08 12:37:52 +08:00
Brendan Heywood
59a44a5bad MDL-47271 tool_task: Added Task API status checks 2020-04-08 14:35:33 +10:00
Eloy Lafuente (stronk7)
2ede5371ed Merge branch 'MDL-67895' of https://github.com/timhunt/moodle 2020-04-08 00:01:33 +02:00