Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

…otal instead of courses/sites total
  • Loading branch information...
commit 2eb3bb390fb7888c343a4393e0ef3fad65be6fa2 1 parent 24654d9
@mouneyrac mouneyrac authored
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}';
Please sign in to comment.
Something went wrong with that request. Please try again.