Skip to content

Commit

Permalink
Added config.php so that the GettingStartedSample is easier to deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
j3parker committed Sep 10, 2013
1 parent 4eaea27 commit fea578c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion samples/GettingStartedSample/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ PHP Getting Started Sample
--------------------------
This sample shows how to authenticate with a Desire2Learn LMS, and make API calls.

To install it, copy the contents of this folder and include the lib folder from the top of the repository into your web server's path and run index.php.
To install it, copy the contents of this folder and the lib folder into your webserver. Edit config.php to point to where you put the lib folder (it is configured to be deployed by cloning this repo into your webserver by default.)
3 changes: 2 additions & 1 deletion samples/GettingStartedSample/authenticateUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
* the License.
*/

require_once 'lib/D2LAppContextFactory.php';
require_once 'config.php';
require_once $config['libpath'] . '/D2LAppContextFactory.php';

$host = trim($_GET['hostField']);
$port = trim($_GET['portField']);
Expand Down
4 changes: 4 additions & 0 deletions samples/GettingStartedSample/config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php
$config = array(
'libpath' => '../../lib'
);
3 changes: 2 additions & 1 deletion samples/GettingStartedSample/doRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
* the License.
*/

require_once 'lib/D2LAppContextFactory.php';
require_once 'config.php';
require_once $config['libpath'] . '/D2LAppContextFactory.php';

$errorArray = array(
D2LUserContext::RESULT_OKAY => "Success",
Expand Down
3 changes: 2 additions & 1 deletion samples/GettingStartedSample/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
* the License.
*/

require_once 'lib/D2LAppContextFactory.php';
require_once 'config.php';
require_once $config['libpath'] . '/D2LAppContextFactory.php';

session_start();

Expand Down

0 comments on commit fea578c

Please sign in to comment.