Skip to content

Commit 27fdd10

Browse files
committed
Merge pull request #444 from dpalou/MOBILE-1518
MOBILE-1518 course: Show title and descr in all sections if only 1 sec
2 parents 2d3f805 + 24d4d67 commit 27fdd10

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

www/core/components/course/controllers/section.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ angular.module('mm.core.course')
4040
$scope.title = $translate.instant('mm.course.allsections');
4141
}
4242
$scope.summary = null;
43+
$scope.allSections = true;
4344
}
4445

4546
// Convenience function to fetch section(s).

www/core/components/course/templates/section.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414

1515
<section class="card" ng-repeat="section in sections" ng-if="section.modules.length > 0 || section.summary != ''">
1616
<!-- Title and summary are displayed when multiple sections per page. -->
17-
<div class="item item-divider" ng-if="sections.length > 1">
17+
<div class="item item-divider" ng-if="allSections">
1818
<h2><mm-format-text watch="true">{{ section.name }}</mm-format-text></h2>
1919
</div>
2020

21-
<div class="item item-text-wrap" ng-if="sections.length > 1 && section.summary">
21+
<div class="item item-text-wrap" ng-if="allSections && section.summary">
2222
<mm-format-text class="mm-content-with-float">{{ section.summary }}</mm-format-text>
2323
</div>
2424

0 commit comments

Comments
 (0)