MDL-59492 block_myoverview: fix remaining course links visibility

This commit is contained in:
Simey Lameze 2017-08-10 10:44:09 +08:00
parent 6dede51557
commit 54798b5fbb
7 changed files with 16 additions and 10 deletions

View File

@ -84,7 +84,7 @@ class courses_view implements renderable, templatable {
$exportedcourse->summary = content_to_text($exportedcourse->summary, $exportedcourse->summaryformat);
// Include course visibility.
$exportedcourse->visible = $course->visible;
$exportedcourse->visible = (bool)$course->visible;
$courseprogress = null;

View File

@ -22,6 +22,9 @@
Example context (json):
{
"urls": {
"noevents": "#"
}
}
}}
<div data-region="event-list-container"

View File

@ -29,11 +29,11 @@
<div class="course-info-container" id="course-info-container-{{id}}">
<div class="hidden-sm-up hidden-tablet hidden-phone">
{{> block_myoverview/progress-chart}}
<h4 class="h5"><a href="{{viewurl}}">{{{fullnamedisplay}}}</a></h4>
<h4 class="h5"><a href="{{viewurl}}" class="{{^visible}}dimmed{{/visible}}">{{{fullnamedisplay}}}</a></h4>
</div>
<div class="hidden-sm-down hidden-tablet hidden-desktop">
{{> block_myoverview/progress-chart}}
<h4 class="h5"><a href="{{viewurl}}">{{{fullnamedisplay}}}</a></h4>
<h4 class="h5"><a href="{{viewurl}}" class="{{^visible}}dimmed{{/visible}}">{{{fullnamedisplay}}}</a></h4>
</div>
<div class="hidden-xs-down hidden-md-up visible-tablet">
<div class="media">
@ -43,7 +43,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{{/visible}}">{{{fullnamedisplay}}}</a></h4>
</div>
</div>
</div>

View File

@ -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}}" class="{{^visible}}dimmed_text{{/visible}}">{{{fullnamedisplay}}}</a></h4>
<h4 class="h5"><a href="{{viewurl}}" class="{{^visible}}dimmed{{/visible}}">{{{fullnamedisplay}}}</a></h4>
</div>
<div class="hidden-xs-down visible-phone">
<div class="media">
@ -41,7 +41,7 @@
</div>
</div>
<div class="media-body">
<h4 class="h5"><a href="{{viewurl}}" class="{{^visible}}dimmed_text{{/visible}}">{{{fullnamedisplay}}}</a></h4>
<h4 class="h5"><a href="{{viewurl}}" class="{{^visible}}dimmed{{/visible}}">{{{fullnamedisplay}}}</a></h4>
</div>
</div>
</div>

View File

@ -22,6 +22,9 @@
Example context (json):
{
"urls": {
"noevents": "#"
}
}
}}
<div data-region="event-list-container"
@ -93,7 +96,7 @@
alt="{{#str}} noevents, block_myoverview {{/str}}"
role="presentation">
<p class="text-muted m-t-1">{{#str}} noevents, block_myoverview {{/str}}</p>
<a href="{{viewurl}}" class="btn btn-secondary text-primary"
<a href="{{viewurl}}" class="btn btn-secondary {{#visible}}text-primary{{/visible}}"
aria-label="{{#str}} viewcoursename, block_myoverview, {{fullnamedisplay}} {{/str}}">
{{#str}} viewcourse, block_myoverview {{/str}}
</a>

View File

@ -29,7 +29,7 @@
<div class="course-info-container" id="course-info-container-{{id}}">
<div class="visible-desktop">
{{> block_myoverview/progress-chart}}
<h4><a href="{{viewurl}}">{{fullnamedisplay}}</a></h4>
<h4><a href="{{viewurl}}" class="{{^visible}}dimmed{{/visible}}">{{fullnamedisplay}}</a></h4>
</div>
<div class="hidden-desktop">
<div class="media">
@ -39,7 +39,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{{/visible}}">{{fullnamedisplay}}</a></h4>
</div>
</div>
</div>

View File

@ -35,7 +35,7 @@
</div>
</div>
<div class="media-body">
<h4 class="media-heading"><a href="{{viewurl}}" class="{{^visible}}dimmed_text{{/visible}}">{{fullnamedisplay}}</a></h4>
<h4 class="media-heading"><a href="{{viewurl}}" class="{{^visible}}dimmed{{/visible}}">{{fullnamedisplay}}</a></h4>
</div>
</div>
<p class="text-muted">