Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
display total number and matching number of courses - refs BT#16819
  • Loading branch information
Sébastien Ducoulombier committed Apr 6, 2020
1 parent d89ad74 commit 2400ad5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main/auth/courses.php
Expand Up @@ -587,6 +587,9 @@
$template = new Template($toolTitle, true, true, false, false, false);
$template->assign('content', $content);
$template->assign('courses', $courses);
$template->assign('total_number_of_courses', CoursesAndSessionsCatalog::countAvailableCoursesToShowInCatalog(
api_get_current_access_url_id()
));
$template->assign('catalog_url_no_extra_fields', $urlNoExtraFields);
$template->assign('pagination', $catalogPagination);

Expand Down
8 changes: 8 additions & 0 deletions main/template/default/catalog/course_catalog.tpl
Expand Up @@ -12,6 +12,14 @@
margin-bottom: 0px;
}
</style>
<div>
{{ 'TotalNumberOfAvailableCourses' }} :
<strong>{{ total_number_of_courses }}</strong>
</div>
<div>
{{ 'NumberOfMatchingCourses' }} :
<strong>{{ courses|length }}</strong>
</div>
{% block course_grid %}
<div class="grid-courses row">
{% for course in courses %}
Expand Down

0 comments on commit 2400ad5

Please sign in to comment.