{{! This file is part of Moodle - http://moodle.org/ Moodle is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Moodle is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Moodle. If not, see . }} {{! @template tool_mobile/subscription Template for subscription information. Classes required for JS: * none Data attributes required for JS: * none Context variables required for this template: * registered - Whether the site is registered * appsportalurl - Apps portal url Example context (json): { "registered" : true, "appsportalurl": "https://apps.moodle.com", "subscription": { "name": "Pro", "description": "This subscription has a Moodle Product Premium plan free of charge", "timecreated": 1587548810, "expiretime": 1618963200, "features": [ { "name": "multimediapushnotifications", "enabled": true, "description": "Multimedia push notifications", "humanstatus": "Enabled", "message": { "type" : "warning", "message" : "Temporary disabled for a promotion" } }, { "name": "pushnotificationsdevices", "enabled": false, "limit": 50, "showbar": 1, "description": "Active user devices for notifications", "status": 55, "humanstatus": "55/50", "barclass": "bg-danger" }, { "name": "custommenuitems", "enabled": false, "limit": 4, "showbar": 1, "description": "Custom menu items", "status": 2, "humanstatus": "2/4" } ] }, "messageswarning": [ { "message" : "You have surpassed your monthly active user devices limit, some messages are beign ignored. We recommend you to upgrade to a paid plan." } ], "notifications": { "totalsentnotifications" : 7600, "totaldevices" : 60, "currentactivedevices" : 55, "ignorednotificationswarning": { "message" : "You have surpassed your monthly active user devices limit, some messages are beign ignored. We recommend you to upgrade to a paid plan." }, "monthly" : [ { "year": 2020, "month": 4, "sentnotifications": 4500, "newdevices": 20, "activedevices": 55, "ignorednotifications": 40, "limitreachedtime": 1586548810 }, { "year": 2020, "month": 3, "sentnotifications": 4500, "newdevices":10, "activedevices": 45, "ignorednotifications": 0, "limitreachedtime": 0 } ] } } }} {{#messageserror}} {{> core/notification_error}} {{/messageserror}} {{#messagessuccess}} {{> core/notification_success}} {{/messagessuccess}} {{#messageswarning}} {{> core/notification_warning}} {{/messageswarning}} {{#messagesinfo}} {{> core/notification_info}} {{/messagesinfo}}

{{# str }} mobileappsubscription, tool_mobile {{/ str }}

{{#messageshtml}} {{{message}}} {{/messageshtml}} {{#subscription}}
{{# str }} name {{/ str }}
{{name}}
{{# str }} description {{/ str }}
{{description}}
{{# str }} subscriptioncreated, tool_mobile {{/ str }}
{{#userdate}} {{timecreated}}, {{#str}} strftimedate {{/str}} {{/userdate}}
{{#expiretime}}
{{# str }} subscriptionexpiration, tool_mobile {{/ str }}
{{#userdate}} {{expiretime}}, {{#str}} strftimedate {{/str}} {{/userdate}}
{{/expiretime}}
{{^registered}} {{# str }} subscriptionregister, tool_mobile, {{ appsportalurl }} {{/ str }} {{/registered}}

{{# str }} subscriptionfeatures, tool_mobile {{/ str }}

{{#features}}
{{^limit}}
{{{description}}}
{{{humanstatus}}}
{{/limit}} {{#limit}}
{{{description}}}
{{#showbar}}
{{humanstatus}}
{{/showbar}} {{^showbar}} {{humanstatus}} {{/showbar}}
{{/limit}} {{#message}} {{message}} {{/message}}
{{/features}} {{#registered}} {{# str }} subscriptionsseemore, tool_mobile, {{ appsportalurl }} {{/ str }} {{/registered}} {{/subscription}}

{{# str }} notifications, tool_mobile {{/ str }}

{{^registered}} {{# str }} subscriptionregister, tool_mobile, {{ appsportalurl }} {{/ str }} {{/registered}} {{#notifications}} {{#ignorednotificationswarning}} {{> core/notification_error}} {{/ignorednotificationswarning}}
{{# str }} notificationscurrentactivedevices, tool_mobile {{/ str }}
{{currentactivedevices}}
{{#notifications.monthly}} {{/notifications.monthly}}
{{#str}}year, form{{/str}} {{#str}}month{{/str}} {{#str}}notificationssentnotifications, tool_mobile{{/str}} {{#str}}notificationsactivedevices, tool_mobile{{/str}} {{#str}}notificationsnewdevices, tool_mobile{{/str}} {{#str}}notificationsignorednotifications, tool_mobile{{/str}}
{{year}} {{month}} {{sentnotifications}} {{activedevices}} {{newdevices}} {{ignorednotifications}}
{{#registered}} {{# str }} notificationsseemore, tool_mobile, {{ appsportalurl }} {{/ str }} {{/registered}} {{/notifications}} {{^notifications}} {{# str }} notificationsmissingwarning, tool_mobile {{/ str }} {{/notifications}}