Commit Graph

365 Commits

Author SHA1 Message Date
Marina Glancy
8fc1486d36 MDL-77164 various: fix incorrect phpdocs 2023-04-13 11:35:06 +01:00
Jake Dallimore
576369bf97 Merge branch 'MDL-77186-master' of https://github.com/andrewnicols/moodle 2023-03-15 12:00:42 +08:00
Meirza
e8a39af31d MDL-77344 mod_forum: Added missing class properties.
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-15 03:53:14 +07:00
Andrew Nicols
9ec46c232d MDL-77186 core: Move all uses of cronlib to new class 2023-03-13 21:21:13 +08:00
Mathew May
e5ca7766e7 MDL-52805 core: Remove legacy log calls 2023-03-07 13:08:46 +08:00
Andrew Nicols
4fa300b78f Merge branch 'MDL-76415-master' of https://github.com/meirzamoodle/moodle 2023-02-16 11:31:42 +08:00
Meirza
1e8ed4e305 MDL-76415 mod_forum: Fixed ${var} string interpolation deprecations.
Since PHP 8.2, placing the dollar sign outside the curly brace is deprecated when
the expression inside the braces resolves to a variable or an expression.
2023-02-13 19:51:47 +07:00
Julien Boulen
0b1e4b57b6 MDL-76312 forum: sort subscribers list by fullname 2023-02-10 10:26:31 +01:00
Andrew Nicols
a3cc26f8bb MDL-76583 core: Update uses of external_* classes 2023-01-19 07:34:09 +08:00
Julien Boulen
b87ead3384 MDL-66924 mod_forum: Allow users to see their own private messages
Allow users to see their own private messages even if they don't have
mod/forum:readprivatereplies capability

Add behat test to avoid MDL-67109 issue.

Co-authored-by: Martin Putzlocher <mputzi@users.noreply.github.com>
2023-01-09 14:41:01 +01:00
Marina Glancy
a800e7e62f MDL-74853 various: add second parameter to htmlentities functions
Default value of the $flag argument changed in PHP 8.1 from ENT_COMPAT to ENT_QUOTES | ENT_SUBSTITUTE
To ensure consistent behavior across different PHP version the second parameter is now required for the functions:
htmlspecialchars(), htmlentities(), htmlspecialchars_decode(), html_entity_decode() and get_html_translation_table()
2022-11-28 16:12:20 +01:00
Andrew Nicols
eecbc3ce15 MDL-70071 forum: Convert post threshold warnings to info 2022-11-03 13:10:22 +08:00
Mihail Geshoski
de4d940d41 MDL-68437 forum: Support to show only active course users in grader
The following change adds support to show only active course users
in the forum grader and generally replicates the behaviour from the
assignment grader which relies on certain config settings, user
permissions and capabilities.
2022-09-30 12:01:08 +08:00
Eloy Lafuente (stronk7)
b12b4c10a4 MDL-71747 upgrade: remove adhoc tasks not used anymore
This code was used only by deleted upgrade steps so it's safe
to proceed with straight deletion, considering it internal.
Deletion has been documented in corresponding upgrade.txt files:

  - \mod_forum\task\refresh_forum_post_counts adhoc task

And these is the list of code that has NOT been removed
because it may be needed in the future:

  - \core_search\manager::clean_up_non_existing_area(), used by
  - adhoc task: \core\task\clean_up_deleted_search_area_task adhoc task
2022-07-07 20:30:11 +02:00
Juan Leyva
51c9c709a9 MDL-75058 course: Fix support for dates on WebServices 2022-06-27 15:29:36 +02:00
Jun Pataleta
0a77eb4ace MDL-74321 mod_forum: Pass course module to forum_check_throttling() 2022-03-28 10:04:05 +08:00
Sujith Haridasan
ff5381ad95 MDL-74121 mod_forum: Fix the posting threshold issue
When a student post exceeds the posting threshold
block then 'Add discussion topic' button should not be shown.
Also the student cannot reply to a topic if this is exceeded.
2022-03-23 14:23:29 +05:30
Sujith Haridasan
e6a4eb3c36 MDL-73415 mod_forum: Address the followup issues for forum
This issue is a followup for changes made in forum. And hence
addresses the following issues spotted for forum:
1. Bring back the "Forums" header in the search page.
2. Remove the stale function forum_update_subscriptions_button
3. Fix the redirection to activity tab when subscription is
   changed, in the subscription tab.
2022-02-22 21:57:21 +05:30
Paul Holden
002077952a MDL-73605 mod_forum: add label/help to the subscription mode options. 2022-02-03 13:25:34 +00:00
Sujith Haridasan
92833547e9 MDL-71915 mod_forum: Update the tertiary nav
Update the tertiary navigation for this
activity.
2021-12-06 09:27:58 +05:30
Sara Arjona
eb4e36400e MDL-71956 core_h5p: Add more scenarios to can_edit_content
The method can_edit_content() now supports more scenarios where the
H5P content can be edited:
- Instead of supporting only mod_h5pactivity, now it supports any
mod or block when the user has the addinstance capability.
- If the component implements the can_edit_content method in the
h5p\canedit class and it returns true. For instance, the mod_forum
implements it and return true when filearea is post, if the user
can edit the post where the H5P is.
2021-11-09 16:47:18 +01:00
Neill Magill
42171eb435 MDL-72767 forum: Ensure digests are sent
Before this change if a new post was made after the digest time but
before todays daily digest had been sent the run time on the digest
would be set to the next day resulting in no digest being sent to
the user.

By adding the server midnight to the custom data on the task we
ensure that in this case a new adhoc task is created for the next
day leaving the current one to get processed.

Server midnight is used so that if the digest time setting is
changed we would not get two tasks queued for the same day.
2021-11-01 08:49:46 +00:00
Peter Dias
2c7893cf9f MDL-52206 core: Update new activity_custom_completion
Update the custom_completion classes to accept the new completion
criteria
2021-10-04 19:45:47 +08:00
sam marshall
e332d1849d MDL-72643 core: Improve display_size
Allows display_size to use a fixed unit for easy comparison of
multiple results, and fixed decimal places for the same reason.

Improves behaviour by using consistent decimal places and a
consistent space before the unit (the previous one only has a space
before 'bytes', not before 'KB').

Of existing uses, all the ones that displayed a 'maxbytes' type
configuration setting (which are likely to have an 'exact' size
and would be better shown as 512 KB rather than 512.0 KB) have been
changed to use 0 decimal places, to preserve previous behaviour.
All the uses which were showing an actual file or memory size have
been left as default (1 decimal place).
2021-09-27 16:52:33 +01:00
Joseph Baxter
c66c299939 MDL-70046 message: handle call processor failure
* ensure message_send returns false if message not sent
* digests only clear queue on success
* notifications requeue failed messages
2021-08-31 10:36:54 +01:00
Tomo Tsuyuki
0646a40b20 MDL-70176 mod_forum: Grading respects separate groups filter 2021-08-20 13:27:50 +10:00
Simey Lameze
8fd7e5edeb MDL-65252 mod_forum: make inline attachment field optional 2021-07-08 16:14:12 +08:00
Simey Lameze
2a95ac4659 MDL-65252 forum: add missing inline attachments logic to forum API 2021-07-06 13:49:29 +08:00
Jake Dallimore
f6804b7ba3 MDL-65252 mod_forum: fix posts builder so it excludes hidden posts
This makes the builder capability aware, via an injected manager
factory and fixes unit tests.
2021-07-02 06:19:16 +08:00
Sara Arjona
b04d1c3041 Merge branch 'MDL-71163-master' of git://github.com/rezaies/moodle 2021-05-03 11:59:58 +02:00
Michael Hawkins
b77c66ac10 MDL-71189 core_completion: Adding completion sort order to activities
This implements sort ordering for all completion conditions, in
activities which support custom completion conditions.
2021-05-03 13:36:11 +08:00
Shamim Rezaie
70ac3b091f MDL-71163 mod_forum: Remove duplicate due date info 2021-04-30 17:13:56 +10:00
Jun Pataleta
0e904ad5db Merge branch 'MDL-70863-master' of git://github.com/jleyva/moodle 2021-04-29 15:04:11 +08:00
abgreeve
ea362206a3 Merge branch 'MDL-70818-master-4' of git://github.com/rezaies/moodle 2021-04-23 12:19:51 +08:00
Shamim Rezaie
31288bd1a6 MDL-70818 mod_forum: implement activity_dates for the forum module 2021-04-23 13:46:28 +10:00
Bas Brands
f9e1c2587a MDL-28452 core_user: migrate social profile fields
Create a new profile field type, move all existing content of the fields
'icq', 'skype', 'aim', 'yahoo', 'msn' and 'url' in the mdl_user table to
theses new profile fields if needed.

AMOS BEGIN
MOV [aimid,core],[aimid,courseimage,profilefield_social]
MOV [yahooid,core],[yahooid,profilefield_social]
MOV [skypeid,core],[skypeid,profilefield_social]
MOV [icqnumber,core],[icqnumber,profilefield_social]
MOV [msnid,core],[msnid,profilefield_social]
MOV [webpage,core],[webpage,profilefield_social]
AMOS END
2021-04-21 11:22:25 +02:00
Sara Arjona
4a45b3f8ef Merge branch 'MDL-68716' of git://github.com/paulholden/moodle 2021-04-12 17:24:33 +02:00
Simey Lameze
7c7c1aafc8 MDL-70820 mod_forum: custom completion implementation 2021-04-07 12:17:30 +08:00
Juan Leyva
b63065cea3 MDL-70863 mod_forum: Allow NULL in timecreated 2021-03-31 17:54:36 +02:00
Paul Holden
a22604d6ed MDL-68716 mod_forum: extra column sorting options in privacy export.
Accounts for extra sort options that were added in bc23cbaf.
2021-03-29 14:05:57 +01:00
sam marshall
5e72715e4f MDL-71099 Lib: Move new user_fields class from core to core_user
This class would belong more appropriately within the 'user' API
(core_user) instead of within the 'core' API, since it is
directly related to user data.

Since the class has only just been added to Moodle, now is a good
time to move it.
2021-03-25 13:47:23 +00:00
sam marshall
558cc1b85e MDL-45242 Lib: Replace calls to deprecated functions
In all cases changes have been kept to a minimum while not making
the code completely horrible. For example, there are many instances
where it would probably be better to rewrite a query entirely, but
I have not done that (in order to reduce the risk of changes).
2021-03-10 10:57:10 +00:00
Iñigo Zendegi
df9eefacef MDL-69097 mod_forum: Apply filters to whole forum grading 2021-02-24 17:08:34 +01:00
Jun Pataleta
f04cbfa7ab MDL-48269 mod_forum: Remove occurrences of hidepicture 2021-02-16 12:48:45 +08:00
Jun Pataleta
cbee8815fc MDL-67959 mod_forum: Display group pictures in forum only if available
Displaying a default group picture in forum posts leads to confusion,
so better to not display a default group picture when the group
picture is not set for the group.
2021-01-29 12:29:29 +08:00
Paul Holden
356b4f9cc4 MDL-70037 mod_forum: include post modified date in external structure. 2020-12-01 00:04:25 +00:00
Bas Brands
56d3baa214 MDL-65792 mod_forum: show release time on timed posts 2020-10-27 08:58:26 +01:00
Bas Brands
4c71e1d0d0 MDL-69454 core_search: consistent mod searches 2020-09-21 11:54:51 +02:00
Andrew Nicols
b0a28f3bbb MDL-66818 mod_forum: Use cap manager to check exportability 2020-08-21 11:33:30 +08:00
gthomas2
4224b8e541 MDL-66818 mod_forum: hide portfolio export button based on caps 2020-08-20 07:46:09 +08:00