Skip to content

Commit

Permalink
Merge branch 'MDL-65621-dimmed-courses' of https://github.com/stopfst…
Browse files Browse the repository at this point in the history
  • Loading branch information
abgreeve committed Aug 14, 2019
2 parents 9311a83 + 1606fb6 commit 523e51f
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 5 deletions.
3 changes: 2 additions & 1 deletion blocks/myoverview/templates/view-cards.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"fullname": "course 3",
"hasprogress": true,
"progress": 10,
"coursecategory": "Miscellaneous"
"coursecategory": "Miscellaneous",
"visible": true
}
]
}
Expand Down
8 changes: 7 additions & 1 deletion blocks/myoverview/templates/view-list.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"fullname": "course 3",
"hasprogress": true,
"progress": 10,
"coursecategory": "Miscellaneous"
"coursecategory": "Miscellaneous",
"visible": true
}
]
}
Expand Down Expand Up @@ -65,6 +66,11 @@
</span>
{{{fullname}}}
</a>
{{^visible}}
<div class="d-flex flex-wrap">
<span class="tag tag-info">{{#str}} hiddenfromstudents {{/str}}</span>
</div>
{{/visible}}
</div>
</div>
{{#hasprogress}}
Expand Down
8 changes: 7 additions & 1 deletion blocks/myoverview/templates/view-summary.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"summary": "This course is about assignments",
"hasprogress": true,
"progress": 10,
"coursecategory": "Miscellaneous"
"coursecategory": "Miscellaneous",
"visible": true
}
]
}
Expand Down Expand Up @@ -75,6 +76,11 @@
</a>
{{> block_myoverview/course-action-menu }}
</div>
{{^visible}}
<div class="d-flex flex-wrap">
<span class="tag tag-info">{{#str}} hiddenfromstudents {{/str}}</span>
</div>
{{/visible}}
<div class="summary">
<span class="sr-only">{{#str}}aria:coursesummary, block_myoverview{{/str}}</span>
{{{summary}}}
Expand Down
3 changes: 3 additions & 0 deletions course/classes/external/course_summary_exporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ public static function define_properties() {
),
'enddate' => array(
'type' => PARAM_INT,
),
'visible' => array(
'type' => PARAM_BOOL,
)
);
}
Expand Down
2 changes: 1 addition & 1 deletion course/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -4621,7 +4621,7 @@ function course_get_recent_courses(int $userid = null, int $limit = 0, int $offs
}

$basefields = array('id', 'idnumber', 'summary', 'summaryformat', 'startdate', 'enddate', 'category',
'shortname', 'fullname', 'timeaccess', 'component');
'shortname', 'fullname', 'timeaccess', 'component', 'visible');

$sort = trim($sort);
if (empty($sort)) {
Expand Down
8 changes: 7 additions & 1 deletion course/templates/coursecard.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"courseimage": "https://moodlesite/pluginfile/123/course/overviewfiles/123.jpg",
"fullname": "course 3",
"hasprogress": true,
"progress": 10
"progress": 10,
"visible": true
}
]
}
Expand Down Expand Up @@ -63,6 +64,11 @@
</span>
{{$coursename}}{{/coursename}}
</a>
{{^visible}}
<div class="d-flex flex-wrap">
<span class="tag tag-info">{{#str}} hiddenfromstudents {{/str}}</span>
</div>
{{/visible}}
</div>
{{$menu}}{{/menu}}
</div>
Expand Down

0 comments on commit 523e51f

Please sign in to comment.