community block MDL-23288 highlight search result

This commit is contained in:
jerome mouneyrac 2010-07-15 05:58:24 +00:00
parent 74c68b7a11
commit 8afbe76511
3 changed files with 3 additions and 9 deletions

View File

@ -167,5 +167,5 @@ $hubselectorform->display();
if (!empty($errormessage)) {
echo $errormessage;
}
echo $renderer->course_list($courses, $huburl);
echo highlight($search, $renderer->course_list($courses, $huburl));
echo $OUTPUT->footer();

View File

@ -40,7 +40,7 @@ $string['coursedesc'] = 'Description';
$string['courselang'] = 'Language';
$string['coursename'] = 'Name';
$string['courses'] = 'Courses';
$string['coverage'] = 'Coverage: {$a}';
$string['coverage'] = 'Tags: {$a}';
$string['download'] = 'Download';
$string['downloadable'] = 'courses I can download';
$string['downloadtemplate'] = 'Create course from template';

View File

@ -106,13 +106,7 @@ class block_community_renderer extends plugin_renderer_base {
//create description to display
$course->subject = get_string($course->subject, 'edufields');
$course->audience = get_string('audience' . $course->audience, 'hub');
$course->educationallevel = get_string('edulevel' . $course->educationallevel, 'hub');
if (!empty($course->contributornames)) {
$course->contributorname = get_string('contributors', 'block_community', $course->contributorname);
}
if (!empty($course->coverage)) {
$course->coverage = get_string('coverage', 'block_community', $course->coverage);
}
$course->educationallevel = get_string('edulevel' . $course->educationallevel, 'hub');
$deschtml .= $course->description; //the description
/// courses and sites number display under the description, in smaller
$deschtml .= html_writer::empty_tag('br');