Is there a way to reduce the forum "Maximum time to edit" setting to zero 0?

Is there a way to reduce the forum "Maximum time to edit" setting to zero 0?

by Matt Bury -
Number of replies: 4
Picture of Plugin developers

Hi Moodlers,

I'd like to use the forum activity for in-class activities & to make out of class interactions & notifications more immediate.

How can I change the "Maximum time to edit" setting to zero without hacking Moodle core code?

If not, can someone kindly direct me to the file where the "Maximum time to edit" array is defined?

TIA!

Average of ratings: -
In reply to Matt Bury

Re: Is there a way to reduce the forum "Maximum time to edit" setting to zero 0?

by Matt Bury -
Picture of Plugin developers
Alternatively, is there any way to set notifications to be sent immediately, as soon as a user replies to a post/comment?
In reply to Matt Bury

Re: Is there a way to reduce the forum "Maximum time to edit" setting to zero 0?

by Séverin Terrier -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Hi,

When you've got the Teacher role, you have an option "Send forum post notifications with no editing-time delay" with explaination "This post will be mailed out immediately to all forum subscribers". Technically, it's the "mailnow" forum string.

So i think all you have to do is find the related capacity, and allow it for your users.

After digging a little, searching for "mailnow" in mod/forum/classes/post_form.php, it seems you need to have 'moodle/course:manageactivities' capability for that, there isn't a dedicated capability...

Perhaps you can make a suggestion for that in the tracker, for the future.

Otherwise, you can set to 1 minute the modification time allowed before sending notification (maxeditingtime in security settings). But it will be for the whole Moodle site.

HTH,
Séverin

Average of ratings: Useful (1)
In reply to Séverin Terrier

Re: Is there a way to reduce the forum "Maximum time to edit" setting to zero 0?

by Matt Bury -
Picture of Plugin developers
Thanks Séverin, yes, it does seem to be something that needs to be changed at the code level. I think Forum notifications are typically sent out as cron tasks, which are every minute so the "mail now" option is probably what I'm looking for. Is that correct?
In reply to Matt Bury

Re: Is there a way to reduce the forum "Maximum time to edit" setting to zero 0?

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
You don't mean Site security settings > Maximum time to edit posts (maxeditingtime), right? With that one can reduce the delay to a value between 60 to 120 seconds, provided that cron runs every minute. Not exactly 0 though!
wink

Edit: Noticed that I am repeating what Séverin said earlier.

Edit 2 (thanks to the delay):  See also https://moodle.org/mod/forum/discuss.php?d=434324#p1747701.

Average of ratings: Useful (1)