Skip to content
Browse files

MDL-29005 display enrollable courses total and downloadable courses t…

…otal instead of courses/sites total
  • Loading branch information...
1 parent 9e47a85 commit 2771063982a759c455b4cbd9d52cdf29e8ade1ff @mouneyrac mouneyrac committed
Showing with 8 additions and 4 deletions.
  1. +6 −4 blocks/community/forms.php
  2. +2 −0 blocks/community/lang/en/block_community.php
View
10 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',
View
2 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}';

0 comments on commit 2771063

Please sign in to comment.
Something went wrong with that request. Please try again.