21111 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
117e4bd40d 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.
2019-05-19 10:42:59 +02:00
Eloy Lafuente (stronk7)
743d66bfbd 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.
2019-05-19 10:42:59 +02:00
Sara Arjona
f6548dfbae 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.
2019-05-19 10:42:59 +02:00
Sara Arjona
88f6ca6cbe 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.
2019-05-19 10:42:59 +02:00
Eloy Lafuente (stronk7)
f2eb04c170 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.
2019-05-19 10:42:59 +02:00
Eloy Lafuente (stronk7)
b6c3b130c4 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.
2019-05-18 11:02:29 +02:00
Jun Pataleta
1cc57c5d10 Merge branch 'MDL-65608-master' of https://github.com/ryanwyllie/moodle 2019-05-16 15:05:47 +08:00
Jun Pataleta
44e148df79 Merge branch 'MDL-65607-master' of git://github.com/mihailges/moodle 2019-05-16 12:56:51 +08:00
Mihail Geshoski
b84f79ec80 MDL-65607 forum: Add prefix to forum global functions 2019-05-16 11:49:37 +08:00
Jun Pataleta
c92a33a5ec Merge branch 'MDL-65603-master' of git://github.com/peterRd/moodle 2019-05-16 11:01:57 +08:00
Jun Pataleta
7383512e04 Merge branch 'MDL-65610-master' of git://github.com/damyon/moodle 2019-05-16 10:35:59 +08:00
Ryan Wyllie
f9d986fa2a MDL-65608 forum: check if group exists in discussion exporter 2019-05-16 09:50:38 +08:00
Sara Arjona
384145b1d1 Merge branch 'MDL-65528-master' of git://github.com/peterRd/moodle 2019-05-15 12:14:46 +02:00
Peter
d7ddc44fbd MDL-65603 mod_forum: Add check for property existence 2019-05-15 16:50:49 +08:00
Damyon Wiese
453120e940 MDL-65610 lti: ltiversion field optional
The ltiversion field only exists for some preconfigured tool types.
2019-05-15 13:46:56 +08:00
Ryan Wyllie
f2eb9de442 MDL-65577 forum: move forum focus outline onto post div 2019-05-15 12:30:49 +08:00
Peter
56e9b6d67d MDL-65603 mod_forum: Recall inline private reply 2019-05-15 09:50:46 +08:00
Jun Pataleta
65c9f44c68 Merge branch 'MDL-65569-master' of git://github.com/andrewnicols/moodle 2019-05-14 12:53:50 +08:00
Peter
76cf4db73e MDL-65528 mod_forum: Do not render add discussion if not permitted 2019-05-14 12:47:32 +08:00
Andrew Nicols
50b52ef4b2 MDL-65569 mod_forum: Correct rules for SSD
In a Single Simple Discussion forum, the first post can only be edited
by a user with the manageactivities capability, but all other posts
behave as normal.
2019-05-14 12:32:05 +08:00
Andrew Nicols
e31f357e64 Merge branch 'MDL-65574-master' of https://github.com/ryanwyllie/moodle 2019-05-14 12:17:25 +08:00
Jun Pataleta
af44f41701 Merge branch 'MDL-65536-master' of https://github.com/snake/moodle 2019-05-14 11:32:02 +08:00
Andrew Nicols
b8b6bd7530 MDL-65536 mod_lti: JWT should use the class loader 2019-05-14 11:27:26 +08:00
Damyon Wiese
db0ccfa922 MDL-65536 mod_lti: OpenSSL configuration
LTI 1.3 requires working openssl functions to generate a private
key used for the JWT. Some installs (e.g. windows) can have the
functions available - but require configuration in php before they
actually do anything.
2019-05-14 11:27:25 +08:00
Ryan Wyllie
f31c531c19 MDL-65574 forum: fix return type for get_first_post_for_discussion_ids 2019-05-14 10:43:37 +08:00
Jun Pataleta
fecf5b8566 Merge branch 'MDL-65557-master' of https://github.com/ryanwyllie/moodle 2019-05-14 09:52:36 +08:00
Ryan Wyllie
6489aa2a45 MDL-65557 forum: increase default image size of author profile url 2019-05-14 08:25:16 +08:00
Ryan Wyllie
9a6f29b019 MDL-65574 forum: discussion_list vault uses post table for author
Update the discussion_list vault to use the first post record from
the posts table join to get the author of the first post rather
than relying on it's own "userid" column which can be incorrect in
the case of split discussions.
2019-05-13 15:03:26 +08:00
Jake Dallimore
63dd2951bb MDL-65536 mod_lti: fix stale platformid when wwwroot is changed
If the site is installed, and then the wwwroot changed, the plugin
config value for platformid for mod_lti is then stale, resulting in
OIDC errors. Given this config value was set using the wwwroot, we
should just be able to use the value of $CFG->wwwroot direcly, thus
avoiding this problem.
2019-05-13 09:09:18 +08:00
Eloy Lafuente (stronk7)
c9a1a6341c MDL-65571 versions: bump all versions and requires near release
version = 2019052000 release version
requires= 2019051100 current beta (week6roll2) version
2019-05-12 23:46:34 +02:00
Eloy Lafuente (stronk7)
c3b8f0ceb3 Merge branch 'MDL-65537-master-enfix' of git://github.com/mudrd8mz/moodle 2019-05-10 20:07:50 +02:00
David Mudrák
14f7489675 MDL-65537 lang: Use fixed strings in tests, too 2019-05-10 12:37:03 +02:00
Helen Foster
f715376907 MDL-65537 lang: Import fixed English strings (en_fix)
Significant string changes:

* isdataunique_help and isfieldrequired_help,core_customfield -
  explanatory wording
* forum:cantogglefavourite,mod_forum - 'Can toggle favourites.'
  changed to 'Star discussions'
2019-05-10 10:17:47 +02:00
Andrew Nicols
04a6cd7b44 Merge branch 'MDL-65520-master' of git://github.com/peterRd/moodle 2019-05-10 11:46:34 +08:00
Andrew Nicols
b375f5731f MDL-63959 feedback: Adjust unit test for perf 2019-05-10 11:41:23 +08:00
Andrew Nicols
090fbe8653 Merge branch 'MDL-63959-master' of git://github.com/tobiasreischmann/moodle 2019-05-10 11:41:11 +08:00
Adrian Greeve
cdc5c34030 Merge branch 'MDL-65457-master' of git://github.com/peterRd/moodle 2019-05-10 10:42:34 +08:00
Peter
9b8e599868 MDL-65457 mod_forum: Provide latest post's author
Provide an updated private replies restriction to latest post
Get the latest post's author and time which takes into account private replies.
2019-05-10 10:29:39 +08:00
Eloy Lafuente (stronk7)
97b6ea2c30 Merge branch 'MDL-65543-master' of git://github.com/andrewnicols/moodle 2019-05-09 19:38:27 +02:00
Andrew Nicols
ac8c12c7b5 MDL-65543 mod_forum: Move require_login before cap check 2019-05-09 19:34:01 +08:00
Peter
da04a0a918 MDL-65520 mod_forum: Add lock icon to indicate locked discussions 2019-05-09 14:27:37 +08:00
Andrew Nicols
3ec925e15e Merge branch 'MDL-65373-master' of https://github.com/ryanwyllie/moodle 2019-05-09 10:51:19 +08:00
Adrian Greeve
6310072793 Merge branch 'MDL-65519-master' of https://github.com/ryanwyllie/moodle 2019-05-09 09:31:47 +08:00
Ryan Wyllie
23129586db MDL-65373 forum: accessibility changes for discussion 2019-05-09 09:10:40 +08:00
Jake Dallimore
3e5f439cb1 Merge branch 'MDL-62599-master' of https://github.com/snake/moodle 2019-05-08 11:48:51 +08:00
Adrian Greeve
bf23d85bf7 Merge branch 'MDL-65484-master' of git://github.com/damyon/moodle 2019-05-08 11:21:59 +08:00
Jake Dallimore
e61312afc9 MDL-62599 mod_lti: fix coding style issues 2019-05-08 11:16:21 +08:00
Peter
cee572aac6 MDL-65508 mod_forum: Add private to the quick forum reply 2019-05-08 11:03:28 +08:00
Adrian Greeve
83cb72bf9e Merge branch 'MDL-65516-master' of git://github.com/mihailges/moodle 2019-05-08 10:27:18 +08:00
Andrew Nicols
544f1d0b0b Merge branch 'MDL-35396-master' of git://github.com/mihailges/moodle 2019-05-08 09:47:04 +08:00