Skip to content

Commit

Permalink
MDL-55315 mod_lti: Fix Nginx 405 error
Browse files Browse the repository at this point in the history
It appears that Nginx doesn't allow POST
to static files.  So rename the fixture from
a HTML file to a PHP file.
  • Loading branch information
polothy committed Jul 22, 2016
1 parent 90a8bdb commit 3077ae6
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 11 deletions.
2 changes: 1 addition & 1 deletion mod/lti/tests/behat/addtool.feature
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Feature: Add tools
And I set the following fields to these values:
| Tool name | Teaching Tool 1 |
| Tool configuration usage | Show in activity chooser and as a preconfigured tool |
And I set the field "Tool base URL/cartridge URL" to local url "/mod/lti/tests/fixtures/tool_provider.html"
And I set the field "Tool base URL/cartridge URL" to local url "/mod/lti/tests/fixtures/tool_provider.php"
And I press "Save changes"
And I log out

Expand Down
2 changes: 1 addition & 1 deletion mod/lti/tests/behat/addtype.feature
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Feature: Add preconfigured tools via teacher interface
| Activity name | Test tool activity 1 |
And I open "Test tool activity 1" actions menu
And I follow "Edit settings" in the open menu
And I set the field "Launch/cartridge URL" to local url "/mod/lti/tests/fixtures/tool_provider.html"
And I set the field "Launch/cartridge URL" to local url "/mod/lti/tests/fixtures/tool_provider.php"
And I press "Save and return to course"
And I follow "Test tool activity 1"
And I switch to "contentframe" iframe
Expand Down
2 changes: 1 addition & 1 deletion mod/lti/tests/behat/toolconfigure.feature
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Feature: Configure tool types

@javascript
Scenario: Attempt to add a tool type from a configuration URL, then cancel
When I set the field "url" to local url "/mod/lti/tests/fixtures/tool_provider.html"
When I set the field "url" to local url "/mod/lti/tests/fixtures/tool_provider.php"
And I press "Add"
Then I should see "Cancel"
And I press "cancel-external-registration"
8 changes: 0 additions & 8 deletions mod/lti/tests/fixtures/tool_provider.html

This file was deleted.

33 changes: 33 additions & 0 deletions mod/lti/tests/fixtures/tool_provider.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php
// 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 <http://www.gnu.org/licenses/>.

/**
* Testing fixture.
*
* @package mod_lti
* @copyright 2016 John Okely
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

?>
<html>
<head>
<title>Tool provider</title>
</head>
<body>
<p>This represents a tool provider</p>
</body>
</html>

0 comments on commit 3077ae6

Please sign in to comment.