There is a new callback, <modname>_is_branded, which, by default,
returns false. It needs to be implemented by modules that want their
logo to be displayed as it is (so without applying any filter to
colour them based on their main purpose).
This issue greatly improves the performance of displaying statistics in
the question bank.
1. The required quiz statistics are now pre-computed by a scheduled task.
2. Cached statistics in the database are now never cleaned up, so the
pre-computed stats are always available.
3. The way the cached statistics are loaded for each question
that is being displayed is now a bit more efficient.
4. Related to that, there is a new callback which activities can implement,
if they want their question statistics to be included in the ones shown
in the question bank.
Note, there is still further improvement possible to load the statistics
for all questions being displayed in bulk. However, that must wait for a
future issue, MDL-75576. The other improvements in this issue are
significant and we did not want to delay releasing them.
Co-authored-by: Jonathan Champ <jrchamp@ncsu.edu>
Co-authored-by: Tim Hunt <t.j.hunt@open.ac.uk>
Removal of the callback get_shortcuts() and its plugin implementations.
The private methods in the content_item_readonly_repository class
which were only used by the callback hook logic are also removed.
Introduces some changes to the exising _extend_settings_navigation()
methods that utilize the global $PAGE object. In order to accomodate
the changes done for the secondary navigation for single activity
courses, the methods that extend the settings navigation can no longer
rely on the $PAGE object, instead the more reliabe way to obtain this
infomation is through the get_page() method from settings_navigation
class.
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.
This involves a few changes:
- The callback is still called by the repository but only if the
replacement callback get_course_content_items is not implemented.
- Debugging is called when the get_shortcuts callback is called.
- We leave lti's implementation of get_shortcuts alone, in order to
maintain the output of get_module_metadata during its deprecation life
span.
The requesting user is not always the same as the current user. The container class now allows a different user
to be set as the requesting user. All capability checks are done against the requesting user.
Also, the $requestinguser is passed to core_calendar_provide_event_action and core_calendar_is_event_visible
callback functions. These callback functions need to be updated in all activity modules to accept a $user parameter.
Allow modules to apply format_text() on user input before calling cm_info::set_content(). This is useful for
modules that add interactive content (for example, JS enhanced folder tree). Otherwise all javascript would
be removed if $CFG->forceclean is enabled.
The new setting will allow to host the temporary backup files
into a specific target directory. Defaults to '$CFG->tempdir/backup'.
Calling make_backup_temp_directory() checks that the required sub-directory
will be properly created under the new target directory.
Mainly to verify groups visibility this new callback has been created.
Note this was originally 3 commits but for amending purposes they have
been squashed.
* Upgrades existing data so that the groupmembersonly option is
replaced with equivalent data for the new availability API.
* Removes the database field and admin setting used for
groupmembersonly.
* Changes core modinfo library to remove/deprecate groupmembersonly
data and functions.
* Changes other core library files to remove groupmembersonly
references.
Includes deprecation of several functions, listed in lib/upgrade.txt.
In new logging api, xxx_get_view_actions() and xxx_get_post_actions()
will not be used to identify the paticipation of user. Event's crud
and edulevel status will define user's participation.
* Added new constant: MOD_SUBTYPE_NO_CHILDREN
* When MOD_SUBTYPE_NO_CHILDREN is returned from xxx_get_types()
then default display is used for activity chooser.
* Updated mod/upgrade.txt
* Removed dead code from navigationlib.php instead of updating
it for new behavior of xxx_get_types
* Updated lib/upgrade.txt
* FEATURE_USES_QUESTION_BANK is now a module_supports flag which declares
that an activity uses the question engine.
* question_module_uses_questions can be used to determine if a module
uses the question bank.