Skip to content

Commit

Permalink
MDL-64438 core_course: Optionally display course category
Browse files Browse the repository at this point in the history
  • Loading branch information
Mihail Geshoski committed Sep 18, 2019
1 parent 310d690 commit 704f93f
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions course/templates/view-cards.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"viewurl": "https://moodlesite/course/view.php?id=2",
"courseimageurl": "https://moodlesite/pluginfile/123/course/overviewfiles/123.jpg",
"fullname": "course 3",
"isfavourite": true
"isfavourite": true,
"coursecategory": "Miscellaneous"
}
]
}
Expand All @@ -36,5 +37,18 @@

{{< core_course/coursecards }}
{{$classes}}one-row{{/classes}}
{{$coursename}} {{{fullname}}} {{/coursename}}
{{$coursename}} {{fullname}} {{/coursename}}
{{$coursecategory}}
{{#showcoursecategory}}
<span class="sr-only">
{{#str}}aria:coursecategory, core_course{{/str}}
</span>
<div class="text-truncate">{{{coursecategory}}}</div>
{{/showcoursecategory}}
{{/coursecategory}}
{{$divider}}
{{#showcoursecategory}}
<div class="pl-1 pr-1">|</div>
{{/showcoursecategory}}
{{/divider}}
{{/ core_course/coursecards }}

0 comments on commit 704f93f

Please sign in to comment.