--- enrol/lti/ims-blti/OAuth.php	2017-11-13 09:35:29.961136271 +0000
+++ enrol/lti/ims-blti/OAuth.php	2017-11-13 09:36:37.109522993 +0000
@@ -196,7 +196,7 @@
    * attempt to build up a request from what was passed to the server
    */
   public static function from_request($http_method=NULL, $http_url=NULL, $parameters=NULL) {
-    $scheme = (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != "on")
+    $scheme = (!isset($_SERVER['HTTPS']) || !$_SERVER['HTTPS'])  
               ? 'http'
               : 'https';
     $port = "";
