Skip to content

Commit

Permalink
Always show progress.
Browse files Browse the repository at this point in the history
  • Loading branch information
gjb2048 committed Jun 28, 2019
1 parent 7c62db8 commit 7377c69
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions classes/output/core_renderer.php
Expand Up @@ -139,6 +139,8 @@ protected function courseprogress($course) {
$templatedata->progress = \core_completion\progress::get_course_progress_percentage($course);
if (!is_null($templatedata->progress)) {
$templatedata->progress = floor($templatedata->progress);
} else {
$templatedata->progress = 0;
}
$progressbar = $this->render_from_template('theme_squared/progress-chart', $templatedata);
if (has_capability('report/progress:view', \context_course::instance($course->id))) {
Expand Down
2 changes: 1 addition & 1 deletion templates/progress-chart.mustache
Expand Up @@ -26,7 +26,7 @@
}}
<div class="progress-chart-container m-b-1">
<div class="progress-doughnut">
<div class="progress-text {{#progress}}has-percent{{/progress}}">{{progress}}&#37;</div>
<div class="progress-text has-percent">{{progress}}&#37;</div>
<div class="progress-indicator">
<svg xmlns="http://www.w3.org/2000/svg">
<g>
Expand Down

0 comments on commit 7377c69

Please sign in to comment.