Skip to content

Commit

Permalink
Merge branch 'MDL-63836-master' of git://github.com/damyon/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
junpataleta committed Nov 8, 2018
2 parents 3aa0cfe + f412074 commit 3bc9a0b
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 87 deletions.
3 changes: 0 additions & 3 deletions admin/settings/courses.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,6 @@
$temp->add(new admin_setting_configselect('moodlecourse/showreports', new lang_string('showreports'), '', 0,
array(0 => new lang_string('no'), 1 => new lang_string('yes'))));

$temp->add(new admin_setting_configcheckbox('moodlecourse/showcourseimages', get_string('showcourseimages'),
get_string('showcourseimages_desc'), 1));

// Files and uploads.
$temp->add(new admin_setting_heading('filesanduploadshdr', new lang_string('filesanduploads'), ''));

Expand Down
3 changes: 0 additions & 3 deletions lang/en/moodle.php
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,6 @@
$string['courseformats'] = 'Course formats';
$string['courseformatoptions'] = 'Formatting options for {$a}';
$string['courseformatudpate'] = 'Update format';
$string['courseheaderimage'] = 'Course header image';
$string['courseprofiles'] = 'Course profiles';
$string['coursepreferences'] = 'Course preferences';
$string['coursegrades'] = 'Course grades';
Expand Down Expand Up @@ -1823,8 +1822,6 @@
$string['showblockcourse'] = 'Show list of courses containing block';
$string['showcategory'] = 'Show {$a}';
$string['showchartdata'] = 'Show chart data';
$string['showcourseimages'] = 'Show course images';
$string['showcourseimages_desc'] = 'Show the course image or image placeholder in the course header.';
$string['showcomments'] = 'Show/hide comments';
$string['showcommentsnonjs'] = 'Show comments';
$string['showdescription'] = 'Display description on course page';
Expand Down
14 changes: 8 additions & 6 deletions lib/db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2666,12 +2666,6 @@ function xmldb_main_upgrade($oldversion) {
upgrade_main_savepoint(true, 2018102900.00);
}

if ($oldversion < 2018102900.01) {
// Show course images by default.
set_config('showcourseimages', 1, 'moodlecourse');
upgrade_main_savepoint(true, 2018102900.01);
}

if ($oldversion < 2018110500.01) {
// Define fields to be added to the 'badge' table.
$tablebadge = new xmldb_table('badge');
Expand Down Expand Up @@ -2769,5 +2763,13 @@ function xmldb_main_upgrade($oldversion) {
upgrade_main_savepoint(true, 2018110500.01);
}

if ($oldversion < 2018110700.01) {
// This config setting added and then removed.
unset_config('showcourseimages', 'moodlecourse');

// Main savepoint reached.
upgrade_main_savepoint(true, 2018110700.01);
}

return true;
}
9 changes: 1 addition & 8 deletions lib/outputrenderers.php
Original file line number Diff line number Diff line change
Expand Up @@ -4153,7 +4153,7 @@ public function render_preferences_group(preferences_group $renderable) {
}

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;
Expand All @@ -4165,13 +4165,6 @@ public function context_header($headerinfo = null, $headinglevel = 1) {
$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'])) {
Expand Down
29 changes: 0 additions & 29 deletions lib/templates/course_header_image.mustache

This file was deleted.

9 changes: 0 additions & 9 deletions theme/boost/scss/moodle/course.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1139,15 +1139,6 @@ span.editinstructions {
opacity: 0.5;
}

.course-header-image-wrapper {
width: 100px;
height: 100px;
.course-header-image {
background-size: cover;
background-position: center;
}
}

/**
* Display sizes:
* Large displays 1200 +
Expand Down
7 changes: 0 additions & 7 deletions theme/boost/style/moodle.css
Original file line number Diff line number Diff line change
Expand Up @@ -12434,13 +12434,6 @@ span.editinstructions {
.course-being-dragged {
opacity: 0.5; }

.course-header-image-wrapper {
width: 100px;
height: 100px; }
.course-header-image-wrapper .course-header-image {
background-size: cover;
background-position: center; }

/**
* Display sizes:
* Large displays 1200 +
Expand Down
11 changes: 0 additions & 11 deletions theme/bootstrapbase/less/moodle/course.less
Original file line number Diff line number Diff line change
Expand Up @@ -1124,17 +1124,6 @@ span.editinstructions {
.opacity(50);
}

.course-header-image-wrapper {
width: 100px;
height: 100px;
.course-header-image {
width: 100%;
height: 100%;
background-size: cover;
background-position: center;
}
}

/**
* Display sizes:
* Large displays 1200 +
Expand Down
10 changes: 0 additions & 10 deletions theme/bootstrapbase/style/moodle.css
Original file line number Diff line number Diff line change
Expand Up @@ -7004,16 +7004,6 @@ span.editinstructions {
opacity: 0.5;
filter: alpha(opacity=50);
}
.course-header-image-wrapper {
width: 100px;
height: 100px;
}
.course-header-image-wrapper .course-header-image {
width: 100%;
height: 100%;
background-size: cover;
background-position: center;
}
/**
* Display sizes:
* Large displays 1200 +
Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

defined('MOODLE_INTERNAL') || die();

$version = 2018110700.00; // YYYYMMDD = weekly release date of this DEV branch.
$version = 2018110700.01; // YYYYMMDD = weekly release date of this DEV branch.
// RR = release increments - 00 in DEV branches.
// .XX = incremental changes.

Expand Down

0 comments on commit 3bc9a0b

Please sign in to comment.