diff --git a/course/lib.php b/course/lib.php
index fd84d5ee6960b..b53c9bd5757ab 100644
--- a/course/lib.php
+++ b/course/lib.php
@@ -1421,7 +1421,7 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
}
// We may be displaying this just in order to show information
- // about visibility, without the actual link
+ // about visibility, without the actual link
if ($mod->uservisible) {
// Display normal module link
if (!$accessiblebutdim) {
@@ -2023,12 +2023,10 @@ function print_category_info($category, $depth, $showcourses = false) {
} else {
$catimage = " ";
}
-
- echo "\n\n".'
';
-
+
$courses = get_courses($category->id, 'c.sortorder ASC', 'c.id,c.sortorder,c.visible,c.fullname,c.shortname,c.summary');
if ($showcourses and $coursecount) {
-
+ echo "\n\n".'';
echo '';
if ($depth) {
@@ -2038,7 +2036,7 @@ function print_category_info($category, $depth, $showcourses = false) {
echo $OUTPUT->spacer(array('height'=>10, 'width'=>$indent, 'br'=>true)); // should be done with CSS instead
echo '';
- }
+ }
echo ''.$catimage.' | ';
echo '';
@@ -2048,13 +2046,13 @@ function print_category_info($category, $depth, $showcourses = false) {
echo ' |
';
// does the depth exceed maxcategorydepth
- // maxcategorydepth == 0 or unset meant no limit
+ // maxcategorydepth == 0 or unset meant no limit
$limit = !(isset($CFG->maxcategorydepth) && ($depth >= $CFG->maxcategorydepth-1));
if ($courses && ($limit || $CFG->maxcategorydepth == 0)) {
foreach ($courses as $course) {
- $linkcss = $course->visible ? '' : ' class="dimmed" ';
+ $linkcss = $course->visible ? '' : ' class="dimmed" ';
echo ' ';
echo ' | ';
echo ''. format_string($course->fullname).'';
@@ -2069,29 +2067,21 @@ function print_category_info($category, $depth, $showcourses = false) {
echo '';
}
echo ' |
';
- }
+ }
}
- } else {
-
- echo '';
-
+ echo '
';
+ } else {
+ echo '';
+ echo '
';
if ($depth) {
$indent = $depth*20;
- echo '
';
- echo $OUTPUT->spacer(array('height'=>10, 'width'=>$indent, 'br'=>true)); // should be done with CSS instead
- echo ' | ';
+ echo $OUTPUT->spacer(array('height'=>10, 'width'=>$indent, 'br'=>true)); // should be done with CSS instead
}
-
- echo '
';
- echo ''. format_string($category->name).'';
- echo ' | ';
- echo '
';
- if (count($courses)) {
- echo count($courses);
- }
- echo ' | ';
- }
- echo '
';
+ echo ''. format_string($category->name).'';
+ echo ' ('.count($courses).')';
+ echo '';
+ echo '';
+ }
}
/**
diff --git a/lang/en/moodle.php b/lang/en/moodle.php
index 262c5d033287e..ab19fa6bebc67 100644
--- a/lang/en/moodle.php
+++ b/lang/en/moodle.php
@@ -1185,6 +1185,7 @@
$string['novalidcourses'] = 'No valid courses to be shown';
$string['now'] = 'now';
$string['numattempts'] = '{$a} failed login attempt(s)';
+$string['numberofcourses'] = 'Number of courses';
$string['numberweeks'] = 'Number of weeks/topics';
$string['numdays'] = '{$a} days';
$string['numhours'] = '{$a} hours';
diff --git a/theme/base/style/course.css b/theme/base/style/course.css
index 4e7b15054c979..8dcda6d6f8c36 100644
--- a/theme/base/style/course.css
+++ b/theme/base/style/course.css
@@ -76,6 +76,8 @@
.categorylist .category.image {width: 20px;}
.categorylist .category.number {text-align: right;}
.categorylist .category.indentation {width: 1px;}
+.categorylist .category .numberofcourse {font-style: italic; font-size: 0.85em; font-style: normal;}
+.categorylist .category {padding-top: 5px; padding-bottom: 5px; }
.path-course-report-outline td.numviews {text-align:right;}
.path-course-report-outline tr.section {text-align: center;}
@@ -104,11 +106,15 @@
.jsenabled .course_category_tree .category.with_children.collapsed .subcategories,
.jsenabled .course_category_tree .category.with_children.collapsed .courses {display:none;}
-/** Overide for RTL layout **/
+.path-course .clearfloat {float:none; clear:both;height:0px;}
+
+/**
+* Overide for RTL layout
+*/
.dir-rtl .coursebox .info {float: right; text-align: right;}
.dir-rtl .coursebox .summary {text-align:right;}
.dir-rtl .course_category_tree .category.with_children> .category_label {background-position: center right; padding-right: 18px;}
.dir-rtl .course_category_tree .category_label, .dir-rtl .course_category_tree .category .course {padding-right:18px;}
.dir-rtl.jsenabled .course_category_tree .category.with_children.collapsed .category_label {background-image:url([[pix:moodle|t/collapsed_rtl]]);}
.dir-rtl .course_category_tree .category .courses .course_link {background-position:center right; padding-right:18px;}
-.dir-rtl .clearfloat {float:none; clear:both;height:0px;}
\ No newline at end of file
+.dir-rtl .clearfloat {float:none; clear:both;height:0px;}