MDL-65621 block_myoverview: tag courses as "hidden from students"

This is intended to visually separate hidden course from open
courses in the course overview block
by applying a "Hidden from students" tag to the various views in
this block.
To achive this, the course summary exporter's output must be
augmented with a "visiblity" attribute,
carrying the given course's corresponding visibility setting.
Since the exporter now expects this data point as part of its input,
the output of the course_get_recent_courses()
function had to also be augmented with the course visibility setting
to provide this value.
This commit is contained in:
Stefan Topfstedt 2019-05-22 15:07:02 -07:00
parent fac49f8f72
commit 1606fb6812
6 changed files with 27 additions and 5 deletions

View file

@ -4593,7 +4593,7 @@ function course_get_recent_courses(int $userid = null, int $limit = 0, int $offs
}
$basefields = array('id', 'idnumber', 'summary', 'summaryformat', 'startdate', 'enddate', 'category',
'shortname', 'fullname', 'timeaccess', 'component');
'shortname', 'fullname', 'timeaccess', 'component', 'visible');
$sort = trim($sort);
if (empty($sort)) {