MDL-57742 core_lib: Make tool_consumer_instance_guid optional
authorDavid Balch <david.balch@conted.ox.ac.uk>
Mon, 28 May 2018 04:42:16 +0000 (12:42 +0800)
committerMark Nelson <markn@moodle.com>
Mon, 28 May 2018 04:47:05 +0000 (12:47 +0800)
In the specification, tool_consumer_instance_guid is only listed
as recommended. However, the library was requiring it.

https://www.imsglobal.org/specs/ltiv2p0/implementation-guide#toc-42

lib/ltiprovider/src/ToolProvider/ToolProvider.php

index 27cbd6e..8994eff 100644 (file)
@@ -808,11 +808,6 @@ EOD;
                         if (!$this->ok) {
                             $this->reason = 'Request is from an invalid tool consumer.';
                         }
-                    } else {
-                        $this->ok = isset($_POST['tool_consumer_instance_guid']);
-                        if (!$this->ok) {
-                            $this->reason = 'A tool consumer GUID must be included in the launch request.';
-                        }
                     }
                 }
                 if ($this->ok) {