Question banks were displaying in places they shouldn't, because
FEATURE_CAN_DISPLAY wasn't fully implemented. This broadens its
usage in the following areas:
- Availability info - Not relevant to qbank. However you could feasibly
have some module which isn't shown to students, but the teacher can
use
it to track completion, so dont display the link.
- Activities block - links to each activity's index page. We already
have
the Question banks page in the secondary nav. No need to have it here
too.
- Overview report - It doesn't make sense to display question banks
here,
as they're not an activity students can participate in, they wont have
dates etc.
- Externallib - Return with candisplay = false. The app needs to handle
this correctly.
- Visibility options, moodleform_mod, modvisible and visibility
selector.
Not relevant for qbank since it doesn't include the standard
coursemodule
options, but if an activity with without CAN_DISPLAY did display a
visibility setting, "Hidden" should be the only option.
- Activity names filter - we dont want automatic links to question
banks.
Course urls may be null when navigation is set to true.
The return value from course_get_url being null was not being handled before
this change, which could lead to an exception causing the page not to load.
It also handles null urls in the course index in Boost so that they are
not a link to what ever the current page is.
If either the first or last section in a format did not a
return a url under the Classic theme there would still be
a link displayed with a link to the current page the user
is on.
After this change no link would be displayed in this case.
The page course/section.php has been created, to display the content of a
single section. This page will only accept sectionid (to get rid of the
legacy sectionnumber).
Some features of this page:
- The General section won't be displayed anymore above the selected
section.
- In the main course page content, regardless of the Course layout ("All
sections on one page" vs "One section per page"), all the section names
will link to the new page (except when editing mode is on).
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.
New function to return the course format settings for external clients
via Web Services.
Some settings (like private keys/tokens) should be not returned if the
user hasn’t appropriate permissions.
With a single-activity course, visibility to students is controlled by
course visibility. There is no sense in having the key activity not
visible to students, and, if you did, the symptoms were almost
incomprehensible. It was very hard to work out what you had done wrong.