mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 02:16:41 +02:00
MDL-63836 course: No course header images
This feature may be added in future, but for now we are not going to include it.
This commit is contained in:
parent
5160567c5f
commit
f41207400b
10 changed files with 10 additions and 87 deletions
|
@ -4153,7 +4153,7 @@ EOD;
|
|||
}
|
||||
|
||||
public function context_header($headerinfo = null, $headinglevel = 1) {
|
||||
global $DB, $USER, $CFG, $COURSE;
|
||||
global $DB, $USER, $CFG;
|
||||
require_once($CFG->dirroot . '/user/lib.php');
|
||||
$context = $this->page->context;
|
||||
$heading = null;
|
||||
|
@ -4165,13 +4165,6 @@ EOD;
|
|||
$heading = $headerinfo['heading'];
|
||||
}
|
||||
|
||||
// Show a course image if enabled.
|
||||
if ($context->contextlevel == CONTEXT_COURSE && get_config('moodlecourse', 'showcourseimages')) {
|
||||
$exporter = new core_course\external\course_summary_exporter($COURSE, ['context' => $context]);
|
||||
$courseinfo = $exporter->export($this);
|
||||
$imagedata = $this->render_from_template('core/course_header_image', $courseinfo);
|
||||
}
|
||||
|
||||
// The user context currently has images and buttons. Other contexts may follow.
|
||||
if (isset($headerinfo['user']) || $context->contextlevel == CONTEXT_USER) {
|
||||
if (isset($headerinfo['user'])) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue