diff --git a/blocks/community/forms.php b/blocks/community/forms.php index c4abd1e352006..6cb92e6d7c561 100644 --- a/blocks/community/forms.php +++ b/blocks/community/forms.php @@ -155,10 +155,12 @@ public function definition() { array('class' => 'hubscreenshot')); $hubdescriptiontext = html_writer::tag('span', format_text($hub['description'], FORMAT_PLAIN), array('class' => 'hubdescription')); - $additionaldesc = get_string('sites', 'block_community') . ': ' . $hub['sites'] . ' - ' . - get_string('courses', 'block_community') . ': ' . $hub['courses']; - $hubdescriptiontext .= html_writer::tag('span', $additionaldesc, - array('class' => 'hubadditionaldesc')); + if (isset($hub['enrollablecourses'])) { //needed for Moodle version < 2011081700 + $additionaldesc = get_string('enrollablecourses', 'block_community') . ': ' . $hub['enrollablecourses'] . ' - ' . + get_string('downloadablecourses', 'block_community') . ': ' . $hub['downloadablecourses']; + $hubdescriptiontext .= html_writer::tag('span', $additionaldesc, + array('class' => 'hubadditionaldesc')); + } if ($hub['trusted']) { $hubtrusted = get_string('hubtrusted', 'block_community'); $hubdescriptiontext .= html_writer::tag('span', diff --git a/blocks/community/lang/en/block_community.php b/blocks/community/lang/en/block_community.php index 0505aeb8e5de2..688509008819d 100644 --- a/blocks/community/lang/en/block_community.php +++ b/blocks/community/lang/en/block_community.php @@ -49,6 +49,7 @@ $string['dorestore'] = 'Yes'; $string['download'] = 'Download'; $string['downloadable'] = 'courses I can download'; +$string['downloadablecourses'] = 'Downloadable courses'; $string['downloadconfirmed'] = 'The backup has been saved in your private files {$a}'; $string['downloaded'] = '...finished.'; $string['downloadingcourse'] = 'Downloading course'; @@ -61,6 +62,7 @@ Others are course templates provided for you to download and use on your own Moodle site.'; $string['enrollable'] = 'courses I can enrol in'; +$string['enrollablecourses'] = 'Enrollable courses'; $string['errorcourselisting'] = 'An error occured when retrieving the course listing from the selected hub, please try again later. ({$a})'; $string['errorhublisting'] = 'An error occured when retrieving the hub listing from Moodle.org, please try again later. ({$a})'; $string['fileinfo'] = 'Language: {$a->lang} - License: {$a->license} - Time updated: {$a->timeupdated}';