diff --git a/blocks/community/communitycourse.php b/blocks/community/communitycourse.php index aa38aa23e92..73df9427e3b 100644 --- a/blocks/community/communitycourse.php +++ b/blocks/community/communitycourse.php @@ -35,14 +35,14 @@ require_once($CFG->dirroot . '/' . $CFG->admin . '/registration/lib.php'); require_login(); $courseid = optional_param('courseid', $SITE->id, PARAM_INT); //if no courseid is given -$context = get_context_instance(CONTEXT_COURSE, $courseid); +$parentcourse = $DB->get_record('course', array('id' => $courseid), '*', MUST_EXIST); -$PAGE->set_context($context); +$context = get_context_instance(CONTEXT_COURSE, $courseid); +$PAGE->set_course($parentcourse); $PAGE->set_url('/blocks/community/communitycourse.php'); $PAGE->set_heading($SITE->fullname); $PAGE->set_pagelayout('course'); $PAGE->set_title(get_string('searchcourse', 'block_community')); -$PAGE->navbar->ignore_active(true); $PAGE->navbar->add(get_string('searchcourse', 'block_community')); $search = optional_param('search', null, PARAM_TEXT); diff --git a/lang/en/hub.php b/lang/en/hub.php index 4f06416b2d4..55498021201 100644 --- a/lang/en/hub.php +++ b/lang/en/hub.php @@ -24,7 +24,6 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -$string['addedtoblock'] = 'Course added to block'; $string['addscreenshots'] = 'Add screenshots'; $string['advertise'] = 'Advertise this course for people to join'; $string['advertised'] = 'Advertised';