MDL-69095 tool_mobile: Display warning if not allowed to use qr login
authorJuan Leyva <juanleyvadelgado@gmail.com>
Tue, 30 Jun 2020 11:59:15 +0000 (13:59 +0200)
committerJuan Leyva <juanleyvadelgado@gmail.com>
Tue, 28 Jul 2020 11:49:26 +0000 (13:49 +0200)
admin/tool/mobile/classes/output/subscription.php

index d8deaca..572a91a 100644 (file)
@@ -184,6 +184,13 @@ class subscription implements \renderable, \templatable {
                                     'type' => 'danger', 'message' => get_string('subscriptionfeaturenotapplied', 'tool_mobile')];
                             }
                             break;
                                     'type' => 'danger', 'message' => get_string('subscriptionfeaturenotapplied', 'tool_mobile')];
                             }
                             break;
+                        // Check QR automatic login.
+                        case 'qrautomaticlogin':
+                            if ($ms->qrcodetype == \tool_mobile\api::QR_CODE_LOGIN) {
+                                $feature['message'] = [
+                                    'type' => 'danger', 'message' => get_string('subscriptionfeaturenotapplied', 'tool_mobile')];
+                            }
+                            break;
                     }
                 }
             }
                     }
                 }
             }