The only case when sesskey is not available is when we came to
subscribe.php from a link in email. In that case, we display a
confirmation page that redirects back providing the sesskey.
All other links to subscribe.php are fixed now so they provide sesskey
as a parameter.
I also polished $mode parameter handling a bit because the check
against empty string was not correct as the value is cast to PARAM_INT.
The string [cannotsubscribe,mod_forum] is supposed to be used for group
membership check only. I have fixed the two other usages of the string.
Note that the condition if (forum_subscribe()) was useless as the
function return true values only now after $DB conversion.
Previous string was used together with the legacy:guest capability.
However, the current code checks is_enrolled() instead. This led to a
weird situation when non-enrolled admin or manager could not subscribe
to a forum and the error message was completely confusing for them.
The problem was in the order of the content preparing. Now when the
filters are always skipped (they have to) we must always run
format_text() first. That will prepare nice HTML in which we just
rewrite the portfolio URIs.
Note that we are still calling clean_text() so that we do not export
malicious code for portfolios like File download. In the future, this
may be changed, made format specific or even per-export configurable.
As a side product of the patch, I have re-enabled online assignment
portfolio export and switched $options->para to false consistently.
The display mode selector is supposed to display in the middle of the
row. Move discussion selector should be on the right, portfolio export
selector on the left. Thanks Sam Marshall for the report and testing the
patches.
The API of the function forum_print_posts_threaded() was changed in
63e87951e6ce93aadc2b891556bf832fe4b5226c but this call was not updated.
This led to not displaying other replies when replying to a forum post.
Filters can replace text with images (smilies, temporary TeX images
etc.), links to glossaries or databases or embedded media players.
Therefore it is important to disable filter processing during portfolio
export.
During the portfolio export, portfolio_rewrite_pluginfile_urls() must be
called before format_text(). Otherwise some filters can interfere with
internal raw record syntax. For example, the Algebra Notation uses @@
for its own purposes and it used to break @@PLUGINFILE@@ placeholder.
Major tasks undertaken in this patch:
* New format_text argument, overflowdiv.
* New page layout Report.
* Review of all format_text calls.
* Added support for the report layout to all themes.
* Changed forum post display from tables to divs.