Skip to content
Permalink
Browse files

Merge branch 'wip-MDL-39520-master' of git://github.com/marinaglancy/…

…moodle
  • Loading branch information...
danpoltawski committed May 8, 2013
2 parents 7e2dd8d + 8a3d804 commit ca463dcf1c6bd84b53723ec2a77ced3c465fbc06
Showing with 11 additions and 7 deletions.
  1. +11 −7 course/renderer.php
@@ -1165,13 +1165,15 @@ protected function coursecat_coursebox_content(coursecat_helper $chelper, $cours
}
// display course category if necessary (for example in search results)
if ($chelper->get_show_courses() == self::COURSECAT_SHOW_COURSES_EXPANDED_WITH_CAT
&& ($cat = coursecat::get($course->category, IGNORE_MISSING))) {
$content .= html_writer::start_tag('div', array('class' => 'coursecat'));
$content .= get_string('category').': '.
html_writer::link(new moodle_url('/course/index.php', array('categoryid' => $cat->id)),
$cat->get_formatted_name(), array('class' => $cat->visible ? '' : 'dimmed'));
$content .= html_writer::end_tag('div'); // .coursecat
if ($chelper->get_show_courses() == self::COURSECAT_SHOW_COURSES_EXPANDED_WITH_CAT) {
require_once($CFG->libdir. '/coursecatlib.php');
if ($cat = coursecat::get($course->category, IGNORE_MISSING)) {
$content .= html_writer::start_tag('div', array('class' => 'coursecat'));
$content .= get_string('category').': '.
html_writer::link(new moodle_url('/course/index.php', array('categoryid' => $cat->id)),
$cat->get_formatted_name(), array('class' => $cat->visible ? '' : 'dimmed'));
$content .= html_writer::end_tag('div'); // .coursecat
}
}
return $content;
@@ -1621,6 +1623,7 @@ public function search_courses($searchcriteria) {
$content = '';
if (!empty($searchcriteria)) {
// print search results
require_once($CFG->libdir. '/coursecatlib.php');
$displayoptions = array('sort' => array('displayname' => 1));
// take the current page and number of results per page from query
@@ -1685,6 +1688,7 @@ public function search_courses($searchcriteria) {
*/
public function tagged_courses($tagid) {
global $CFG;
require_once($CFG->libdir. '/coursecatlib.php');
$displayoptions = array('limit' => $CFG->coursesperpage);
$displayoptions['viewmoreurl'] = new moodle_url('/course/search.php',
array('tagid' => $tagid, 'page' => 1, 'perpage' => $CFG->coursesperpage));

0 comments on commit ca463dc

Please sign in to comment.
You can’t perform that action at this time.