Commit 9f83c879 authored by Lisa Seeto's avatar Lisa Seeto Committed by Kristina Hoeppner
Browse files

Bug 1896352: Error when adding LTI connection: 'component' not available



 Add check to see if consumer is true

behatnotneeded

Change-Id: I1dae492acb1c47c68e0a10428f742092776b588f
Signed-off-by: default avatarLisa Seeto <lisaseeto@catalyst.net.nz>
parent 4adf18c6
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -769,9 +769,11 @@ function get_module_from_serverid($serverid) {
            JOIN {external_services} es
                ON es.id = osr.externalserviceid
            WHERE osr.id = ? ', array($serverid));
    if ($consumer) {
        if (substr_count($consumer->component, '/') > 0) {
            return explode("/", $consumer->component);
        }
    }
    return array('auth', 'webservice');
}