diff --git a/wp-content/plugins/candela-lti/candela-lti.php b/wp-content/plugins/candela-lti/candela-lti.php index 134f0261..ea4435fe 100644 --- a/wp-content/plugins/candela-lti/candela-lti.php +++ b/wp-content/plugins/candela-lti/candela-lti.php @@ -102,7 +102,7 @@ public static function deactivate() { */ public static function lti_launch() { global $wp; - + setcookie('content_only', 1, time()+3600, COOKIEPATH, COOKIE_DOMAIN); // allows deep links with an LTI launch urls like: // candela/api/lti/BLOGID?page_title=page_name // candela/api/lti/BLOGID?page_title=section_name%2Fpage_name @@ -117,7 +117,7 @@ public static function lti_launch() { // 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 ); exit; } @@ -125,7 +125,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'] ); exit; } @@ -133,7 +133,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'] ); exit; } @@ -643,4 +643,3 @@ public static function remove_db_table() { } } - diff --git a/wp-content/plugins/candela-utility/themes/washington/functions.php b/wp-content/plugins/candela-utility/themes/washington/functions.php index d861dad7..3be0eb87 100644 --- a/wp-content/plugins/candela-utility/themes/washington/functions.php +++ b/wp-content/plugins/candela-utility/themes/washington/functions.php @@ -124,3 +124,6 @@ function add_iframe_resize_message() { ); } + function LTI_header_display() { + isset($_COOKIE['content_only']); + } diff --git a/wp-content/plugins/candela-utility/themes/washington/header.php b/wp-content/plugins/candela-utility/themes/washington/header.php index 99b9091a..1e5dc0b2 100644 --- a/wp-content/plugins/candela-utility/themes/washington/header.php +++ b/wp-content/plugins/candela-utility/themes/washington/header.php @@ -76,7 +76,7 @@ Skip to main content - +