Pass current user object to post builder as argument, so that the permission to view timed post
will check with current user, who is viewing the posts instead of user who made that post.
There were inconsistencies with the text shown on the submit button,
depending on the where the button was shown.
* Inline reply forum displayed general "Submit".
* Experimental nested discussion view reply form displayed "Post"
(post/core string) which acts as a noun in other contexts and cannot
be used as such in many non-English languages.
* Advanced reply form displayed "Post to forum".
The patch fixes this and starts to show "Post to forum" in all three
places consistently.
While working on this, two more issues were noticed and fixed:
* Inline reply textarea's title was hard-coded English "post" text.
Changed to "Message" to provide advisory information related to the
element.
* Buttons contained title attribute with the same value as the explicit
button text. This goes against accessibility guidelines.
This is to further improve the performance of searching of posts related
to the given user. Once both userid and privatereplyto are indexed, the
query planner can use the merged index to search for posts records.
The idea here is to replace the existing LEFT JOINs and
OR / IS NOT NULL conditions with INNER JOINs and ANDs. So we gather the
discussions data from all three areas in individual queries, make their
UNION. The GROUP BY was present before and maybe it is not even needed
any more (due to how UNION works) but it should not hurt to keep it.
This leads to significantly improved performance.
The method get_grading_manager() is called in the file so make sure the
library is loaded. Without it, the forum's privacy provider unit test
ended with error.
Not directly related to the issue, but noticed while working on it.
The exists/contains steps of behat are case-sensitive, in the other
side, depending of the OS and locales, time functions are not 100%
consistent. See https://bugs.php.net/bug.php?id=76378 for example.
So only solutions are:
1) Create a specific new step performing the checks case insensitively.
2) Avoid making AM / PM part of the checks.
Here we have opted by the 2nd approach, it's not critical part to check.
Applying filters on an activity module description when using it as a
new calendar event's description is bad m'kay? We need to store the raw
text and apply the filters only when we actually display the text. That
way, filters (such as multi-language content) may actually fully work
and we do not initialise the theme and output machinery.
Additionally, we need to explicitly set the format of the description
text to HTML (because we have converted it to it already). Otherwise it
defaults to the current user's preferred editor format.
This is still a pragmatic hot-fix solution. The proper solution would be
to pass the raw text, format and embedded files.
Reasons:
- The element “h4” must not appear as a descendant of the “address” element
- This element should not contain more information than the contact
information, like a publication date (which belongs in a <time> element)
element)
This change enables the gherkinlint rule to require a new line at the
end of the file. This change is in keeping with existing Moodle coding
style guidelines.