Skip to content

Commit

Permalink
Mobile app: Use module-info instead of module-description
Browse files Browse the repository at this point in the history
  • Loading branch information
dpalou authored and danmarsden committed Jul 24, 2024
1 parent e30030c commit ed11c23
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
1 change: 1 addition & 0 deletions classes/output/mobile.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ public static function main_view($args) {
'currentgrade' => $currentgrade,
'hasgrade' => isset($currentgrade),
'warning' => $warning,
'canusemoduleinfo' => $args->appversioncode >= 44000,
];

return [
Expand Down
21 changes: 16 additions & 5 deletions templates/mobile_view_latest.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,22 @@

{{=<% %>=}}
<div>
<core-course-module-description
description="<% subcourse.intro %>"
component="mod_subcourse"
componentId="<% cmid %>">
</core-course-module-description>
<%#canusemoduleinfo%>
<core-course-module-info
[module]="module"
description="<% subcourse.intro %>"
component="mod_subcourse"
componentId="<% cmid %>"
[courseId]="courseId">
</core-course-module-info>
<%/canusemoduleinfo%>
<%^canusemoduleinfo%>
<core-course-module-description
description="<% subcourse.intro %>"
component="mod_subcourse"
componentId="<% cmid %>">
</core-course-module-description>
<%/canusemoduleinfo%>

<%# warning %>
<ion-card class="ion-text-wrap core-warning-card">
Expand Down

0 comments on commit ed11c23

Please sign in to comment.