diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 3f7c0545..00000000 --- a/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -wp-config.php -wp-content/uploads -wp-content/debug.log -.DS_Store diff --git a/.htaccess b/.htaccess deleted file mode 100644 index 951d4572..00000000 --- a/.htaccess +++ /dev/null @@ -1,24 +0,0 @@ - -# BEGIN WordPress - -RewriteEngine On -# force SSL -RewriteCond %{HTTPS} !=on -# -RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] -RewriteBase / -RewriteRule ^index\.php$ - [L] - -# add a trailing slash to /wp-admin -RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] - -RewriteCond %{REQUEST_FILENAME} -f [OR] -RewriteCond %{REQUEST_FILENAME} -d -RewriteRule ^ - [L] -RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L] -RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L] -RewriteRule . index.php [L] - - - -# END WordPress diff --git a/wp-content/plugins/candela-lti/candela-lti.php b/wp-content/plugins/candela-lti/candela-lti.php index 134f0261..f2437c3e 100644 --- a/wp-content/plugins/candela-lti/candela-lti.php +++ b/wp-content/plugins/candela-lti/candela-lti.php @@ -14,6 +14,12 @@ // If file is called directly, abort. if ( ! defined( 'ABSPATH' ) ) exit; +// session_start() called in pressbooks.php +if (!isset($_SESSION['LTI_session'])) { + session_start(); + $_SESSION['LTI_session'] = array(); +} + // Do our necessary plugin setup and add_action routines. CandelaLTI::init(); @@ -114,10 +120,10 @@ public static function lti_launch() { } else { $slash = '/'; } - +//-REMOVE DEFUNCT(?) 'content_only' REDIRECTS? // todo make all the hide_* parameters copy over? // If it's a deep LTI link default to showing content_only - wp_redirect( get_bloginfo('wpurl') . $slash . $page . "?content_only" ); +//- wp_redirect( get_bloginfo('wpurl') . $slash . $page . "?content_only" ); exit; } @@ -125,7 +131,7 @@ public static function lti_launch() { // candela/api/lti/BLOGID?page_id=10 if ( ! empty($wp->query_vars['page_id'] ) && is_numeric($wp->query_vars['page_id']) ) { switch_to_blog((int)$wp->query_vars['blog']); - wp_redirect( get_bloginfo('wpurl') . "?p=" . $wp->query_vars['page_id'] . "&content_only" ); +//- wp_redirect( get_bloginfo('wpurl') . "?p=" . $wp->query_vars['page_id'] . "&content_only" ); exit; } @@ -133,7 +139,7 @@ public static function lti_launch() { // custom_page_id=10 if ( ! empty($wp->query_vars['custom_page_id'] ) && is_numeric($wp->query_vars['custom_page_id']) ) { switch_to_blog((int)$wp->query_vars['blog']); - wp_redirect( get_bloginfo('wpurl') . "?p=" . $wp->query_vars['custom_page_id'] . "&content_only" ); +//- wp_redirect( get_bloginfo('wpurl') . "?p=" . $wp->query_vars['custom_page_id'] . "&content_only" ); exit; } @@ -643,4 +649,3 @@ public static function remove_db_table() { } } - diff --git a/wp-content/plugins/candela-utility/themes/bombadil/functions.php b/wp-content/plugins/candela-utility/themes/bombadil/functions.php index 8d1b3875..6b3d224a 100644 --- a/wp-content/plugins/candela-utility/themes/bombadil/functions.php +++ b/wp-content/plugins/candela-utility/themes/bombadil/functions.php @@ -123,3 +123,7 @@ function add_iframe_resize_message() { ); } + +function LTI_display_header() { + isset($_SESSION['LTI_session']); +} diff --git a/wp-content/plugins/candela-utility/themes/bombadil/header.php b/wp-content/plugins/candela-utility/themes/bombadil/header.php index 56e38e27..ca62cfe0 100644 --- a/wp-content/plugins/candela-utility/themes/bombadil/header.php +++ b/wp-content/plugins/candela-utility/themes/bombadil/header.php @@ -80,7 +80,7 @@ Skip to main content - +