mirror of
https://github.com/moodle/moodle.git
synced 2025-01-31 12:45:04 +01:00
community MDL-19314 display correct translated value for educational level and audience, do not display coverage and contributors if empty
This commit is contained in:
parent
ae2fa74f95
commit
db38fcb759
@ -25,9 +25,10 @@
|
||||
*/
|
||||
|
||||
$string['addcommunitycourse'] = 'Add community course';
|
||||
$string['additionalcoursedesc'] = 'Contributors: {$a->contributornames} - Coverage: {$a->coverage} - Creator: {$a->creatorname} - Publisher: {$a->publishername} - Subject: {$a->subject}
|
||||
$string['additionalcoursedesc'] = '{$a->contributornames} {$a->coverage} - Creator: {$a->creatorname} - Publisher: {$a->publishername} - Subject: {$a->subject}
|
||||
- Audience: {$a->audience} - Educational level: {$a->educationallevel}';
|
||||
$string['addcourse'] = 'Search';
|
||||
$string['contributors'] = ' - Contributors: {$a}';
|
||||
$string['coursedesc'] = 'Description';
|
||||
$string['courselang'] = 'Language';
|
||||
$string['coursename'] = 'Name';
|
||||
|
@ -80,6 +80,14 @@ 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);
|
||||
}
|
||||
$deschtml = $course->description; //the description
|
||||
/// courses and sites number display under the description, in smaller
|
||||
$deschtml .= html_writer::empty_tag('br');
|
||||
|
Loading…
x
Reference in New Issue
Block a user