moodle.git
2 years agoMerge branch 'MDL-57729-master' of git://github.com/mihailges/moodle
Adrian Greeve [Wed, 29 May 2019 03:39:38 +0000 (11:39 +0800)]
Merge branch 'MDL-57729-master' of git://github.com/mihailges/moodle

2 years agoMerge branch 'MDL-65726-master' of git://github.com/marinaglancy/moodle
Adrian Greeve [Wed, 29 May 2019 03:06:30 +0000 (11:06 +0800)]
Merge branch 'MDL-65726-master' of git://github.com/marinaglancy/moodle

2 years agoMDL-57729 enrol_lti: Escape the property values of the xpath elements
Mihail Geshoski [Wed, 29 May 2019 01:55:23 +0000 (09:55 +0800)]
MDL-57729 enrol_lti: Escape the property values of the xpath elements

2 years agoMerge branch 'MDL-65326-master' of https://github.com/dmitriim/moodle
Jake Dallimore [Wed, 29 May 2019 01:27:17 +0000 (09:27 +0800)]
Merge branch 'MDL-65326-master' of https://github.com/dmitriim/moodle

2 years agoMDL-65726 role: do not fail unittest if plugins create their roles
Marina Glancy [Mon, 27 May 2019 15:45:58 +0000 (17:45 +0200)]
MDL-65726 role: do not fail unittest if plugins create their roles

2 years agoMerge branch 'MDL-65705-master' of git://github.com/sarjona/moodle
Adrian Greeve [Tue, 28 May 2019 08:27:29 +0000 (16:27 +0800)]
Merge branch 'MDL-65705-master' of git://github.com/sarjona/moodle

2 years agoMDL-65705 badges: fix issued date for external badges
Sara Arjona [Fri, 24 May 2019 11:59:15 +0000 (13:59 +0200)]
MDL-65705 badges: fix issued date for external badges

The preg_match('~^[1-9][0-9]*$~', x) calls have been replaced to
is_numeric(x).

2 years agoMerge branch 'MDL-65657-int-fix-1' of https://github.com/ryanwyllie/moodle
Jake Dallimore [Tue, 28 May 2019 06:05:32 +0000 (14:05 +0800)]
Merge branch 'MDL-65657-int-fix-1' of https://github.com/ryanwyllie/moodle

2 years agoMDL-65657 message: reduce message poll timer for behat tests
Ryan Wyllie [Tue, 28 May 2019 01:59:14 +0000 (09:59 +0800)]
MDL-65657 message: reduce message poll timer for behat tests

2 years agoMerge branch 'MDL-65697-master' of git://github.com/lameze/moodle
Jun Pataleta [Tue, 28 May 2019 05:31:41 +0000 (13:31 +0800)]
Merge branch 'MDL-65697-master' of git://github.com/lameze/moodle

2 years agoMerge branch 'MDL-65692-master' of git://github.com/abgreeve/moodle
Jake Dallimore [Tue, 28 May 2019 05:26:44 +0000 (13:26 +0800)]
Merge branch 'MDL-65692-master' of git://github.com/abgreeve/moodle

2 years agoMDL-65326 backup: check caps exist before assigning
Dmitrii Metelkin [Tue, 28 May 2019 00:46:26 +0000 (10:46 +1000)]
MDL-65326 backup: check caps exist before assigning

2 years agoMerge branch 'MDL-65606' of https://github.com/Chocolate-lightning/moodle
Jun Pataleta [Mon, 27 May 2019 08:27:58 +0000 (16:27 +0800)]
Merge branch 'MDL-65606' of https://github.com/Chocolate-lightning/moodle

2 years agoMerge branch 'MDL-64330-master' of git://github.com/andrewnicols/moodle
Jake Dallimore [Mon, 27 May 2019 07:20:31 +0000 (15:20 +0800)]
Merge branch 'MDL-64330-master' of git://github.com/andrewnicols/moodle

2 years agoMDL-64330 course: Correct course test assumptions
Andrew Nicols [Fri, 24 May 2019 06:51:29 +0000 (14:51 +0800)]
MDL-64330 course: Correct course test assumptions

2 years agoMerge branch 'MDL-65699-master' of http://github.com/dravek/moodle
Adrian Greeve [Mon, 27 May 2019 06:52:13 +0000 (14:52 +0800)]
Merge branch 'MDL-65699-master' of github.com/dravek/moodle

2 years agoMerge branch 'MDL-65708-master' of git://github.com/Chocolate-lightning/moodle
Andrew Nicols [Mon, 27 May 2019 06:46:41 +0000 (14:46 +0800)]
Merge branch 'MDL-65708-master' of git://github.com/Chocolate-lightning/moodle

2 years agoMDL-65606 mod_data: Add approvalstatusclass to template
Mathew May [Wed, 15 May 2019 03:21:27 +0000 (11:21 +0800)]
MDL-65606 mod_data: Add approvalstatusclass to template

2 years agoMerge branch 'MDL-65657-master' of https://github.com/ryanwyllie/moodle
Jake Dallimore [Mon, 27 May 2019 05:22:45 +0000 (13:22 +0800)]
Merge branch 'MDL-65657-master' of https://github.com/ryanwyllie/moodle

2 years agoMDL-65708 output: Get a base config from Boost
Mathew May [Fri, 24 May 2019 08:39:15 +0000 (16:39 +0800)]
MDL-65708 output: Get a base config from Boost

As a part of the removal of bootstrapbase & clean
I removed some logic that got the base config of bootstrapbase,
this should of been changed to get boosts config.
See: e00f1c663c1

2 years agoMDL-65657 message: revert polling timeout back to old algorithm
Ryan Wyllie [Tue, 21 May 2019 03:40:36 +0000 (11:40 +0800)]
MDL-65657 message: revert polling timeout back to old algorithm

2 years agoMerge branch 'MDL-64523-master' of git://github.com/rezaies/moodle
Adrian Greeve [Mon, 27 May 2019 02:48:06 +0000 (10:48 +0800)]
Merge branch 'MDL-64523-master' of git://github.com/rezaies/moodle

2 years agoMerge branch 'MDL-65680_master' of git://github.com/dmonllao/moodle
Andrew Nicols [Mon, 27 May 2019 00:42:40 +0000 (08:42 +0800)]
Merge branch 'MDL-65680_master' of git://github.com/dmonllao/moodle

2 years agoMDL-64523 core_access: replace .delegate with .on
Shamim Rezaie [Thu, 14 Mar 2019 06:55:06 +0000 (17:55 +1100)]
MDL-64523 core_access: replace .delegate with .on

As of jQuery 3.0, .delegate() has been deprecated. It was superseded by
the .on() method since jQuery 1.7, so its use was already discouraged.

2 years agoMDL-64523 core_access: Fix js racing issue when overriding permissions
Shamim Rezaie [Thu, 23 May 2019 06:07:43 +0000 (16:07 +1000)]
MDL-64523 core_access: Fix js racing issue when overriding permissions

2 years agoMDL-64523 core_access: Improve the title of the delete role links
Shamim Rezaie [Fri, 24 May 2019 17:54:58 +0000 (03:54 +1000)]
MDL-64523 core_access: Improve the title of the delete role links

2 years agoMerge branch 'MDL-65060-master' of git://github.com/aanabit/moodle
Sara Arjona [Fri, 24 May 2019 10:34:23 +0000 (12:34 +0200)]
Merge branch 'MDL-65060-master' of git://github.com/aanabit/moodle

2 years agoMDL-65060 core_message: Delete messages behat test
Amaia Anabitarte [Mon, 20 May 2019 13:39:41 +0000 (15:39 +0200)]
MDL-65060 core_message: Delete messages behat test

2 years agoMDL-65680 analytics: Fix random failure on slow test environments
David Monllaó [Fri, 24 May 2019 08:59:13 +0000 (10:59 +0200)]
MDL-65680 analytics: Fix random failure on slow test environments

2 years agoMDL-65697 qtype_missingtype: include missing class
Simey Lameze [Thu, 23 May 2019 23:01:24 +0000 (07:01 +0800)]
MDL-65697 qtype_missingtype: include missing class

2 years agoweekly on-sync release 3.8dev
Eloy Lafuente (stronk7) [Thu, 23 May 2019 18:36:19 +0000 (20:36 +0200)]
weekly on-sync release 3.8dev

2 years agoMerge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install
Eloy Lafuente (stronk7) [Thu, 23 May 2019 18:36:16 +0000 (20:36 +0200)]
Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install

2 years agoMDL-65699 core_calendar: Check string exists for event types
David Matamoros [Thu, 23 May 2019 15:21:27 +0000 (17:21 +0200)]
MDL-65699 core_calendar: Check string exists for event types

2 years agoMDL-65060 core_message: Group message data generator
Amaia Anabitarte [Mon, 20 May 2019 13:39:13 +0000 (15:39 +0200)]
MDL-65060 core_message: Group message data generator

2 years agoMerge branch 'MDL-65695-master' of git://github.com/andrewnicols/moodle
Eloy Lafuente (stronk7) [Thu, 23 May 2019 08:48:25 +0000 (10:48 +0200)]
Merge branch 'MDL-65695-master' of git://github.com/andrewnicols/moodle

2 years agoMDL-65694 grade: Fix missing gradelib library
David Mudrák [Thu, 23 May 2019 05:48:54 +0000 (07:48 +0200)]
MDL-65694 grade: Fix missing gradelib library

In the be8f453b74fbd3 the gradelib loading was removed by mistake. So
the library may not be loaded and executing the task may end with
the exception - class 'grade_grade' not found.

2 years agoMDL-65692 backup: Default settings set on install and upgrade.
Adrian Greeve [Thu, 23 May 2019 06:06:59 +0000 (14:06 +0800)]
MDL-65692 backup: Default settings set on install and upgrade.

Asynchronous backup settings are now filled out with the defaults
on installation and upgrade.

2 years agoMDL-65695 forum: Bump digest time to next day if in past
Andrew Nicols [Thu, 23 May 2019 05:52:32 +0000 (13:52 +0800)]
MDL-65695 forum: Bump digest time to next day if in past

2 years agoMerge branch 'MDL-55197' of https://github.com/timhunt/moodle
Jun Pataleta [Thu, 23 May 2019 03:58:14 +0000 (11:58 +0800)]
Merge branch 'MDL-55197' of https://github.com/timhunt/moodle

2 years agoMerge branch 'MDL-59650-master' of git://github.com/lameze/moodle
Andrew Nicols [Thu, 23 May 2019 02:19:55 +0000 (10:19 +0800)]
Merge branch 'MDL-59650-master' of git://github.com/lameze/moodle

2 years agoMerge branch 'MDL-65549_master' of git://github.com/dmonllao/moodle
Adrian Greeve [Thu, 23 May 2019 02:09:09 +0000 (10:09 +0800)]
Merge branch 'MDL-65549_master' of git://github.com/dmonllao/moodle

2 years agoMerge branch 'MDL-65634_master' of git://github.com/dmonllao/moodle
Adrian Greeve [Thu, 23 May 2019 01:53:47 +0000 (09:53 +0800)]
Merge branch 'MDL-65634_master' of git://github.com/dmonllao/moodle

2 years agoMerge branch 'MDL-65654-master' of https://github.com/danielneis/moodle
Andrew Nicols [Thu, 23 May 2019 01:35:17 +0000 (09:35 +0800)]
Merge branch 'MDL-65654-master' of https://github.com/danielneis/moodle

2 years agoMerge branch 'MDL-64530' of git://github.com/stronk7/moodle
Adrian Greeve [Thu, 23 May 2019 01:21:59 +0000 (09:21 +0800)]
Merge branch 'MDL-64530' of git://github.com/stronk7/moodle

2 years agoAutomatically generated installer lang files
AMOS bot [Thu, 23 May 2019 00:12:44 +0000 (00:12 +0000)]
Automatically generated installer lang files

2 years agoMDL-65060 core_message: Group_message_message_content selector
Amaia Anabitarte [Mon, 20 May 2019 13:38:54 +0000 (15:38 +0200)]
MDL-65060 core_message: Group_message_message_content selector

2 years agoMDL-65060 core_message: add render buffer to conversations
Ryan Wyllie [Wed, 28 Nov 2018 04:08:42 +0000 (12:08 +0800)]
MDL-65060 core_message: add render buffer to conversations

Change the conversation logic to render using a buffer so that we can
immediately save state. The render patches are based on the state so
the UI will always reach eventual consistency with the state since the
patches are processed in order.

2 years agoMerge branch 'MDL-65661-master' of git://github.com/peterRd/moodle
Sara Arjona [Wed, 22 May 2019 12:57:39 +0000 (14:57 +0200)]
Merge branch 'MDL-65661-master' of git://github.com/peterRd/moodle

2 years agoMerge branch 'MDL-65636' of https://github.com/timhunt/moodle
Jun Pataleta [Wed, 22 May 2019 11:36:11 +0000 (19:36 +0800)]
Merge branch 'MDL-65636' of https://github.com/timhunt/moodle

2 years agoMDL-65661 block_myoverview: Truncate category name
Peter [Wed, 22 May 2019 11:30:48 +0000 (19:30 +0800)]
MDL-65661 block_myoverview: Truncate category name

2 years agoMDL-65661 core_course: Truncate long course names
Peter [Tue, 21 May 2019 09:43:28 +0000 (17:43 +0800)]
MDL-65661 core_course: Truncate long course names

2 years agoMDL-55197 filter_multilang: handle 'en' as parent lang better
Tim Hunt [Fri, 17 May 2019 14:35:54 +0000 (15:35 +0100)]
MDL-55197 filter_multilang: handle 'en' as parent lang better

2 years agoMDL-55197 filter_multilang: move preg_callback fn into class
Tim Hunt [Fri, 17 May 2019 14:18:06 +0000 (15:18 +0100)]
MDL-55197 filter_multilang: move preg_callback fn into class

2 years agoMDL-65636 filter_multilang: add some basic unit tests
Tim Hunt [Fri, 17 May 2019 11:22:19 +0000 (12:22 +0100)]
MDL-65636 filter_multilang: add some basic unit tests

This commit includes suggestions from Jun Pataleta on how to improve the
unit tests.

2 years agoMerge branch 'MDL-65067_master' of https://github.com/dmonllao/moodle
Adrian Greeve [Wed, 22 May 2019 08:29:52 +0000 (16:29 +0800)]
Merge branch 'MDL-65067_master' of https://github.com/dmonllao/moodle

2 years agoMerge branch 'MDL-64784' of https://github.com/paulholden/moodle
Adrian Greeve [Wed, 22 May 2019 06:48:28 +0000 (14:48 +0800)]
Merge branch 'MDL-64784' of https://github.com/paulholden/moodle

2 years agoMerge branch 'MDL-65590-master' of git://github.com/rezaies/moodle
Andrew Nicols [Wed, 22 May 2019 05:52:14 +0000 (13:52 +0800)]
Merge branch 'MDL-65590-master' of git://github.com/rezaies/moodle

2 years agoMerge branch 'MDL-65591-master' of git://github.com/rezaies/moodle
Jun Pataleta [Wed, 22 May 2019 03:06:31 +0000 (11:06 +0800)]
Merge branch 'MDL-65591-master' of git://github.com/rezaies/moodle

2 years agoMerge branch 'MDL-65630-master' of git://github.com/rezaies/moodle
Andrew Nicols [Wed, 22 May 2019 01:43:13 +0000 (09:43 +0800)]
Merge branch 'MDL-65630-master' of git://github.com/rezaies/moodle

2 years agoMDL-65549 tool_analytics: Reduce the context name length in models_view
David Monllaó [Thu, 9 May 2019 13:47:48 +0000 (15:47 +0200)]
MDL-65549 tool_analytics: Reduce the context name length in models_view

2 years agoMDL-65634 analytics: Discard late and early student enrolments
David Monllaó [Fri, 17 May 2019 10:23:12 +0000 (12:23 +0200)]
MDL-65634 analytics: Discard late and early student enrolments

2 years agoMerge branch 'MDL-65605-master' of git://github.com/rezaies/moodle
Sara Arjona [Tue, 21 May 2019 11:47:31 +0000 (13:47 +0200)]
Merge branch 'MDL-65605-master' of git://github.com/rezaies/moodle

2 years agoMerge branch 'MDL-65274-master' of git://github.com/jleyva/moodle
Jun Pataleta [Tue, 21 May 2019 10:49:33 +0000 (18:49 +0800)]
Merge branch 'MDL-65274-master' of git://github.com/jleyva/moodle

2 years agoMerge branch 'MDL-60407-master' of git://github.com/vmdef/moodle
Jun Pataleta [Tue, 21 May 2019 10:44:52 +0000 (18:44 +0800)]
Merge branch 'MDL-60407-master' of git://github.com/vmdef/moodle

2 years agoMDL-59650 core_calendar: remove limit from calendar UI
Simey Lameze [Tue, 21 May 2019 02:46:47 +0000 (10:46 +0800)]
MDL-59650 core_calendar: remove limit from calendar UI

2 years agoMDL-59650 core_calendar: remove limit from event exporter
Simey Lameze [Tue, 21 May 2019 01:59:39 +0000 (09:59 +0800)]
MDL-59650 core_calendar: remove limit from event exporter

2 years agoMerge branch 'MDL-65572-master' of git://github.com/damyon/moodle
Adrian Greeve [Tue, 21 May 2019 07:19:29 +0000 (15:19 +0800)]
Merge branch 'MDL-65572-master' of git://github.com/damyon/moodle

2 years agoMerge branch 'MDL-65644' of git://github.com/stronk7/moodle
Andrew Nicols [Tue, 21 May 2019 04:49:32 +0000 (12:49 +0800)]
Merge branch 'MDL-65644' of git://github.com/stronk7/moodle

2 years agoMDL-65590 tool_customlang: Escape html on the standard text field
Shamim Rezaie [Tue, 14 May 2019 06:18:10 +0000 (16:18 +1000)]
MDL-65590 tool_customlang: Escape html on the standard text field

2 years agoMerge branch 'MDL-65655-37-forumcroninactiveusers' of git://github.com/mudrd8mz/moodle
Adrian Greeve [Tue, 21 May 2019 03:42:13 +0000 (11:42 +0800)]
Merge branch 'MDL-65655-37-forumcroninactiveusers' of git://github.com/mudrd8mz/moodle

2 years agoAutomatically generated installer lang files
AMOS bot [Tue, 21 May 2019 00:12:47 +0000 (00:12 +0000)]
Automatically generated installer lang files

2 years agoAutomatically generated installer lang files
AMOS bot [Tue, 21 May 2019 00:12:47 +0000 (00:12 +0000)]
Automatically generated installer lang files

2 years agoMDL-64530 travis: Enabble PHP 7.3 and redis cache
Eloy Lafuente (stronk7) [Mon, 20 May 2019 21:12:58 +0000 (23:12 +0200)]
MDL-64530 travis: Enabble PHP 7.3 and redis cache

This commit performs a number of changes:

- Enables PHP 7.3, replacing PHP 7.2 (max/min approach).
- Enables back the redis service
- Configures redis cache store tests to be run.
- Disables redis session tests for PHP 7.2 and up (MDL-60978)

2 years agoMDL-65644 upgrade: add 3.7.0 separation line to all upgrade scripts
Eloy Lafuente (stronk7) [Mon, 20 May 2019 17:35:05 +0000 (19:35 +0200)]
MDL-65644 upgrade: add 3.7.0 separation line to all upgrade scripts

2 years agoMDL-65655 forum: Do not send notifications to inactive users
David Mudrák [Mon, 20 May 2019 16:39:13 +0000 (18:39 +0200)]
MDL-65655 forum: Do not send notifications to inactive users

We cannot deliver notifications to users who had subscribed to a forum
or discussion and were later inactivated either by suspending or setting
the auth method to nologin. The deliver adhoc task cannot be run as
these users, throwing the "Suspended account" exception.

The solution is to make sure that fetch_subscribed_users() does not
include those inactive users.

2 years agoMDL-65591 tool_customlang: Re-adding the save buttons at the bottom
Shamim Rezaie [Tue, 14 May 2019 04:40:26 +0000 (14:40 +1000)]
MDL-65591 tool_customlang: Re-adding the save buttons at the bottom

2 years agoMDL-65654 tool_uploaduser: Fix undefined variable warning
Daniel Neis Araujo [Mon, 20 May 2019 15:44:05 +0000 (12:44 -0300)]
MDL-65654 tool_uploaduser: Fix undefined variable warning

2 years agoMDL-65274 mod_quiz: Do not return a translated string
Juan Leyva [Tue, 14 May 2019 15:00:25 +0000 (17:00 +0200)]
MDL-65274 mod_quiz: Do not return a translated string

We should be returning proper error codes and the translated string can be part of the debug information.

2 years agoMDL-65605 core_question: Fix the issue when get_draft_files returns nul
Shamim Rezaie [Wed, 15 May 2019 07:52:17 +0000 (17:52 +1000)]
MDL-65605 core_question: Fix the issue when get_draft_files returns nul

2 years agoMDL-65605 mod_lesson: Fix the issue when get_draft_files returns null
Shamim Rezaie [Wed, 15 May 2019 07:47:50 +0000 (17:47 +1000)]
MDL-65605 mod_lesson: Fix the issue when get_draft_files returns null

2 years agoMDL-65630 mod_quiz: Allow redo within an attempt with random questions
Shamim Rezaie [Mon, 20 May 2019 12:56:57 +0000 (22:56 +1000)]
MDL-65630 mod_quiz: Allow redo within an attempt with random questions

2 years agoMDL-65630 mod_quiz: Move logging in to the start of tests
Shamim Rezaie [Mon, 20 May 2019 05:30:01 +0000 (15:30 +1000)]
MDL-65630 mod_quiz: Move logging in to the start of tests

The background is for set up, the scenario is for the test. Logging in
to start the test is the start of the test and the end of the background
itself.

2 years agoMerge branch 'MDL-65643' of git://github.com/stronk7/moodle
Andrew Nicols [Mon, 20 May 2019 06:24:49 +0000 (14:24 +0800)]
Merge branch 'MDL-65643' of git://github.com/stronk7/moodle

2 years agoMDL-65572 messaging: Loginas upgrade check
Damyon Wiese [Mon, 13 May 2019 03:41:43 +0000 (11:41 +0800)]
MDL-65572 messaging: Loginas upgrade check

When using login as, we also need to check if there are legacy messages that
need updating and set the user preference if required.

2 years agoMDL-65643 backup: Bump release to 3.8
Eloy Lafuente (stronk7) [Sun, 19 May 2019 19:11:05 +0000 (21:11 +0200)]
MDL-65643 backup: Bump release to 3.8

2 years agoweekly back-to-dev release 3.8dev
Eloy Lafuente (stronk7) [Sun, 19 May 2019 09:24:14 +0000 (11:24 +0200)]
weekly back-to-dev release 3.8dev

2 years agoMoodle release 3.7 v3.7.0
Eloy Lafuente (stronk7) [Sun, 19 May 2019 09:18:33 +0000 (11:18 +0200)]
Moodle release 3.7

2 years agoNOBUG: Change travis.yml back to master
Eloy Lafuente (stronk7) [Sun, 19 May 2019 09:18:34 +0000 (11:18 +0200)]
NOBUG: Change travis.yml back to master

2 years agoNOBUG: Change travis.yml to MOODLE_37_STABLE
Eloy Lafuente (stronk7) [Sun, 19 May 2019 09:18:34 +0000 (11:18 +0200)]
NOBUG: Change travis.yml to MOODLE_37_STABLE

2 years agoMerge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install
Eloy Lafuente (stronk7) [Sun, 19 May 2019 09:18:30 +0000 (11:18 +0200)]
Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install

2 years agoMDL-65635 forum: Small improvement to the submit inline-reply
Eloy Lafuente (stronk7) [Sat, 18 May 2019 18:41:52 +0000 (20:41 +0200)]
MDL-65635 forum: Small improvement to the submit inline-reply

This commit mimics 100% the behavior achieved with the
parent commit of this when using the advance option.

1) Rename the 'tohtml' option to 'topreferredformat' to better
represent what it's doing.

2) Always honor the preferred format (this is a new post).

3) Only perform the conversion to HTML when the preferred format is
HTML.

That way any user, no matter thy are using format MOODLE (plain textbox),
MARKDOWN (marklar editor) or HTML (atto and tinymce editor) will
get always the format correct and the contents ready to be edited if
desired. HTML ones converted to HTML and TEXT ones unmodified.

2 years agoMDL-65635 forum: Small improvement to the advanced button
Eloy Lafuente (stronk7) [Sat, 18 May 2019 17:49:39 +0000 (19:49 +0200)]
MDL-65635 forum: Small improvement to the advanced button

1) Always honor the preferred format (this is a new post).
2) Only perform the conversion to HTML when the preferred format is
HTML.

This way, users having HTML as format (because of their editor
preference) will get the inline-reply converted to HTML and the
editor displayed.

And users not having HTML as format (because of their edito preference)
will get the format set to their format (PLAIN, MOODLE or MARKDOWN) with the
contents unmodified. Of course, if anybody is using a PLAIN, MOODLE or
MARKDOWN editor... it will be displayed.

2 years agoMDL-65635 forum: convert inline reply format when opening the advanced
Sara Arjona [Fri, 17 May 2019 19:39:57 +0000 (21:39 +0200)]
MDL-65635 forum: convert inline reply format when opening the advanced

When a inline reply post is written and the user changes to the
advanced edition, the post format has to be converted from FORMAT_MOODLE.

2 years agoMDL-65635 forum: Add messageformat and tohtml params to inline-reply
Sara Arjona [Fri, 17 May 2019 17:55:29 +0000 (19:55 +0200)]
MDL-65635 forum: Add messageformat and tohtml params to inline-reply

The messageformat and tohtml params have been added to the addDiscussionPost
method to send the original format the contents are written and to force
to convert them from "messageformat" to HTML.

2 years agoMDL-65635 forum: add_discussion_post() format support changes
Eloy Lafuente (stronk7) [Fri, 17 May 2019 18:44:48 +0000 (20:44 +0200)]
MDL-65635 forum: add_discussion_post() format support changes

While keeping BC as possible (format will be saved as FORMAT_HTML
as default and content not modified), this commit includes these
changes:

- A new parameter 'messageformat', defaults to FORMAT_HTML.
- A new option 'tohtml', enabling the function to convert content
  in other formats to FORMAT_HTML before saving them.

2 years agoMerge branch 'MDL-65641' of git://github.com/stronk7/moodle
Eloy Lafuente (stronk7) [Sun, 19 May 2019 08:23:36 +0000 (10:23 +0200)]
Merge branch 'MDL-65641' of git://github.com/stronk7/moodle

2 years agoMDL-65641 forum: Make forum post form to honor existing MOODLE_FORMAT
Eloy Lafuente (stronk7) [Fri, 17 May 2019 23:54:52 +0000 (01:54 +0200)]
MDL-65641 forum: Make forum post form to honor existing MOODLE_FORMAT

Since the night of the times (MDL-16698) we have been performing
that simple empty($post->messageformat) check to decide if the
preferred editor format should be used, instead of any existing format.

Problem is that FORMAT_MOODLE == 0, so the condition evaluates
to to true and then the preferred editor takes the baton when it should
not. Exiting format must win always!

So this just makes the condition a little better, checking if the
attribute is set and that it's numerical (accepting both n and 'n').

That covers the FORMAT_MOODLE case and any other valid format. Only if the
conditions aren't met the preferred editor format takes the baton. Only
then.

2 years agoAutomatically generated installer lang files
AMOS bot [Sat, 18 May 2019 00:12:30 +0000 (00:12 +0000)]
Automatically generated installer lang files

2 years agoMDL-65067 tool_analytics: Limit update_end_date to format_weeks
David Monllaó [Fri, 17 May 2019 14:57:46 +0000 (16:57 +0200)]
MDL-65067 tool_analytics: Limit update_end_date to format_weeks

2 years agoMDL-65067 analytics: Strengthen format_weeks detection
Didier 'OdyX' Raboud [Thu, 14 Mar 2019 13:00:27 +0000 (14:00 +0100)]
MDL-65067 analytics: Strengthen format_weeks detection

The public function get_section_dates($section, $startdate = false) is
only defined in format_weeks, not in format_base.

As other formats can (and format_topcoll has) declare a different
get_section_dates public method, merely checking that it exists is not
sufficient to guarantee that it can be called with just a section object.

Check that the format either is, or is a subclass of format_weeks.