Skip to content

Commit c5cc4a7

Browse files
committed
step link in wf overview only if courses > 0
1 parent 5217b61 commit c5cc4a7

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

styles.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ span.tool_lifecycle-hint {
100100
#lifecycle-workflow-details .courses-table {
101101
flex: 40% 1 1;
102102
border: 1px solid #bbb;
103-
border-right: none;
103+
margin-right: 2em;
104104
}
105105

106106
#lifecycle-workflow-details .bar {

templates/workflowoverview.mustache

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,14 @@
129129
</div>
130130
</div>
131131
<div class="wf-content">
132-
<a href="{{nosteplink}}&step={{id}}">{{icon}}{{name}}
133-
{{#str}} courses {{/str}}: {{numberofcourses}}
134-
</a>
132+
{{#numberofcourses}}
133+
<a href="{{nosteplink}}&step={{id}}">{{icon}}{{name}}
134+
{{#str}} courses {{/str}}: {{numberofcourses}}
135+
</a>
136+
{{/numberofcourses}}
137+
{{^numberofcourses}}
138+
{{#str}} courses {{/str}}: {{numberofcourses}}
139+
{{/numberofcourses}}
135140
</div>
136141
</div>
137142
{{/steps}}

workflowoverview.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,12 @@
117117

118118
$showcoursecounts = get_config('tool_lifecycle', 'showcoursecounts');
119119
if ($showcoursecounts) {
120-
// On moodle instances with many courses the following call can be fatal, because each trigger
121-
// check function will be called for every single course of the instance to determine how many
122-
// courses will be triggered by the workflow/the specific trigger. This count is only being
123-
// used to show the admin how many courses will be triggered, it has no functional aspect.
120+
/*
121+
On moodle instances with many courses the following call can be fatal, because each trigger
122+
check function will be called for every single course of the instance to determine how many
123+
courses will be triggered by the workflow/the specific trigger. This count is only being
124+
used to show the admin how many courses will be triggered, it has no functional aspect.
125+
*/
124126
$amounts = (new \tool_lifecycle\processor())->get_count_of_courses_to_trigger_for_workflow($workflow->id);
125127
$displaytotaltriggered = !empty($triggers);
126128
}

0 commit comments

Comments
 (0)