-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Expand file tree
/
Copy pathtsugi.php
More file actions
30 lines (23 loc) · 731 Bytes
/
Copy pathtsugi.php
File metadata and controls
30 lines (23 loc) · 731 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
use \Tsugi\Core\LTIX;
define('COOKIE_SESSION', true);
require_once "tsugi/config.php";
$launch = LTIX::session_start();
// If variant vhost.php was missing on the server, still use variant lessons.json when present.
if ( $CFG->getVhostId() ) {
$variant_lessons = $CFG->getVhostSiteFile('lessons.json');
if ( is_readable($variant_lessons) ) {
$CFG->lessons = $variant_lessons;
}
}
// Make PHP paths pretty .../install => install.php
$router = new Tsugi\Util\FileRouter();
$file = $router->fileCheck();
if ( $file ) {
require_once($file);
return;
}
// Pull in the Tsugi LMS Routes (/lessons, /map, /badges ...)
$app = new \Tsugi\Controllers\Tsugi($launch);
$app['debug'] = true;
$app->run();