community block MDL-24825 fix 'community search' crumbtrail
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user