Skip to content

Commit

Permalink
MDL-59492 block_myoverview: handle course visibility style
Browse files Browse the repository at this point in the history
  • Loading branch information
mackensen authored and lameze committed Aug 14, 2017
1 parent f3625f4 commit 6dede51
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions blocks/myoverview/classes/output/courses_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ public function export_for_template(renderer_base $output) {
// Convert summary to plain text.
$exportedcourse->summary = content_to_text($exportedcourse->summary, $exportedcourse->summaryformat);

// Include course visibility.
$exportedcourse->visible = $course->visible;

$courseprogress = null;

$classified = course_classify_for_timeline($course);
Expand Down
4 changes: 2 additions & 2 deletions blocks/myoverview/templates/courses-view-course-item.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<div class="card-block course-info-container" id="course-info-container-{{id}}">
<div class="hidden-sm-up hidden-phone">
{{> block_myoverview/progress-chart}}
<h4 class="h5"><a href="{{viewurl}}">{{{fullnamedisplay}}}</a></h4>
<h4 class="h5"><a href="{{viewurl}}" class="{{^visible}}dimmed_text{{/visible}}">{{{fullnamedisplay}}}</a></h4>
</div>
<div class="hidden-xs-down visible-phone">
<div class="media">
Expand All @@ -41,7 +41,7 @@
</div>
</div>
<div class="media-body">
<h4 class="h5"><a href="{{viewurl}}">{{{fullnamedisplay}}}</a></h4>
<h4 class="h5"><a href="{{viewurl}}" class="{{^visible}}dimmed_text{{/visible}}">{{{fullnamedisplay}}}</a></h4>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
</div>
</div>
<div class="media-body">
<h4 class="media-heading"><a href="{{viewurl}}">{{fullnamedisplay}}</a></h4>
<h4 class="media-heading"><a href="{{viewurl}}" class="{{^visible}}dimmed_text{{/visible}}">{{fullnamedisplay}}</a></h4>
</div>
</div>
<p class="text-muted">
Expand Down

0 comments on commit 6dede51

Please sign in to comment.