In the navigation menu , the 'more' option was previously taking the user to all course page
This patch fixes that behavior and takes the user to the dashboard
Now when enrol_get_my_courses(), enrol_get_users_courses() and
enrol_get_all_users_courses() methods automatically reflect the
navsortmycoursessort setting by default, we do not need to manually
compose the sorting any more.
The new recordset support for Postgres requires transactions and
will cause errors if recordsets are not closed correctly. This
commit fixes problems that were identified during unit tests, and
via some basic code analysis, across all core code. Most of these
are incorrect usage of recordset (forgetting to close them).
Consolidate the logic for the list of courses an admin will see in the calendar.
They will see all courses if calendar_admincanseeall is enabled.
They will see only courses they are enrolled in of calendar_admincanseeall is not enabled.
They will also see the current course, if they are admin and it is not already in the list.
This applies to the course selector and the create and update event forms.
The calendar link in the navigation block has also been changed to link to the current course calendar instead of the global
one.
The general string 'Publish' has been used in sense of publishing a
course on a hub - as such, it is better to keep that string together
with other related strings in the core_hub component. All these are
being reworded to 'Share'.
As this has been the only meaning of the string in the core, I am
deprecating it now. Third party plugins should better come with their
own variant of the string, should they need it.
- count() can only be called on arrays or Countable, it can not be called on null
- recordset is neither so iterator_count() should be used
- instanceof or get_class() can not be applied to non-objects
- class methods must have the same arguments as methods in parent class
The course object passed as parameter to extend_navigation_user
callback contained only a few parameters, some parameters like
showgrades or showreports were missing.
The callback should receive a full course object.
Fix to:
- Make sure we properly check both user and course contexts in
the load_for_user function in navigation lib and user the
user_can_view_profile function for same-course access checks.
- Use user_can_view_profile in the renderer's context_header to
properly decide whether a user can view another user's picture
and messaging options in the page header.
Fixes a bug in which a user's full name might be disclosed via the
nav tree. Nav generation now checks the current user's access to the
user before adding the node, else adds a dummy node.
There can be a different number of courses displayed in the
'Navigation' block and in the 'Flat' navigation. This patch
decides what courses we want to display on each, then
applies the 'navcourselimit' setting individually.
Add field 'visibleoncoursepage' to the course_modules table
Add site-wide setting for turning on stealth mode availability
Add callback for "stealth" mode support in the course formats
Change display of modules/sections availability on the course page
The single activity course format has no course front page, so we need
to make a special case for it so it's possible to get to the course
admin menu and put the course nodes in the flat navigation.