Commit 70c555d6 authored by ROBERT PATRICK CAREY III's avatar ROBERT PATRICK CAREY III 🗿

Merged Canvas Embeds module

parent a9f96f7a
langcode: en
status: true
dependencies:
config:
- field.storage.paragraph.field_content
module:
- paragraphs
- text
- views_arg_order_sort
id: views_embed_lesson_paragraphs
label: 'Embed Paragraph(s)'
module: views
description: ''
tag: ''
base_table: paragraphs_item_field_data
base_field: id
core: 8.x
display:
default:
display_plugin: default
id: default
display_title: Master
position: 0
display_options:
access:
type: none
options: { }
cache:
type: tag
options: { }
query:
type: views_query
options:
disable_sql_rewrite: false
distinct: false
replica: false
query_comment: ''
query_tags: { }
exposed_form:
type: basic
options:
submit_button: Apply
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
expose_sort_order: true
sort_asc_label: Asc
sort_desc_label: Desc
pager:
type: full
options:
items_per_page: 10
offset: 0
id: 0
total_pages: null
tags:
previous: ‹‹
next: ››
first: '« First'
last: 'Last »'
expose:
items_per_page: false
items_per_page_label: 'Items per page'
items_per_page_options: '5, 10, 25, 50'
items_per_page_options_all: false
items_per_page_options_all_label: '- All -'
offset: false
offset_label: Offset
quantity: 9
style:
type: default
options:
row_class: 'reading-mode w-100'
default_row_class: false
uses_fields: false
row:
type: 'entity:paragraph'
options:
relationship: none
view_mode: default
fields:
id:
table: paragraphs_item_field_data
field: id
id: id
entity_type: null
entity_field: id
plugin_id: field
relationship: none
group_type: group
admin_label: ''
label: ''
exclude: false
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: true
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
click_sort_column: value
type: number_integer
settings: { }
group_column: value
group_columns: { }
group_rows: true
delta_limit: 0
delta_offset: 0
delta_reversed: false
delta_first_last: false
multi_type: separator
separator: ', '
field_api_classes: false
field_content:
id: field_content
table: paragraph__field_content
field: field_content
relationship: none
group_type: group
admin_label: ''
label: ''
exclude: false
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: false
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
click_sort_column: value
type: text_default
settings: { }
group_column: value
group_columns: { }
group_rows: true
delta_limit: 0
delta_offset: 0
delta_reversed: false
delta_first_last: false
multi_type: separator
separator: ', '
field_api_classes: false
plugin_id: field
filters:
status:
value: '1'
table: paragraphs_item_field_data
field: status
plugin_id: boolean
entity_type: paragraph
entity_field: status
id: status
expose:
operator: ''
group: 1
sorts:
weight:
id: weight
table: views_arg_order_sort
field: weight
relationship: none
group_type: group
admin_label: ''
order: DESC
exposed: false
expose:
label: ''
inherit_type: 0
null_below: 0
argument_number: '0'
field_type: 'paragraphs_item_field_data::id'
plugin_id: views_arg_order_sort_default
title: ''
header: { }
footer: { }
empty: { }
relationships: { }
arguments:
id:
id: id
table: paragraphs_item_field_data
field: id
relationship: none
group_type: group
admin_label: ''
default_action: 'not found'
exception:
value: all
title_enable: false
title: All
title_enable: false
title: ''
default_argument_type: fixed
default_argument_options:
argument: ''
default_argument_skip_url: false
summary_options:
base_path: ''
count: true
items_per_page: 25
override: false
summary:
sort_order: asc
number_of_records: 0
format: default_summary
specify_validation: false
validate:
type: none
fail: 'not found'
validate_options: { }
break_phrase: true
not: false
entity_type: paragraph
entity_field: id
plugin_id: numeric
display_extenders: { }
cache_metadata:
max-age: -1
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- url
- url.query_args
tags:
- 'config:field.storage.paragraph.field_content'
page_1:
display_plugin: page
id: page_1
display_title: 'Embed Paragraph(s)'
position: 1
display_options:
display_extenders: { }
path: embed/paragraph
display_description: ''
cache_metadata:
max-age: -1
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- url
- url.query_args
tags:
- 'config:field.storage.paragraph.field_content'
langcode: en
status: true
dependencies:
config:
- field.storage.node.field_paragraph
- node.type.lesson
module:
- entity_reference_revisions
- node
- user
id: views_embed_lessons
label: Embed Lesson(s)
module: views
description: ''
tag: ''
base_table: node_field_data
base_field: nid
core: 8.x
display:
default:
display_plugin: default
id: default
display_title: Master
position: 0
display_options:
access:
type: perm
options:
perm: 'access content'
cache:
type: tag
options: { }
query:
type: views_query
options:
disable_sql_rewrite: false
distinct: false
replica: false
query_comment: ''
query_tags: { }
exposed_form:
type: basic
options:
submit_button: Apply
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
expose_sort_order: true
sort_asc_label: Asc
sort_desc_label: Desc
pager:
type: full
options:
items_per_page: 10
offset: 0
id: 0
total_pages: null
tags:
previous: ' Previous'
next: 'Next ›'
first: '« First'
last: 'Last »'
expose:
items_per_page: false
items_per_page_label: 'Items per page'
items_per_page_options: '5, 10, 25, 50'
items_per_page_options_all: false
items_per_page_options_all_label: '- All -'
offset: false
offset_label: Offset
quantity: 9
style:
type: default
options:
grouping: { }
row_class: reading-mode
default_row_class: false
row:
type: fields
fields:
field_paragraph:
id: field_paragraph
table: node__field_paragraph
field: field_paragraph
relationship: none
group_type: group
admin_label: ''
label: ''
exclude: false
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: false
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: false
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
click_sort_column: target_id
type: entity_reference_revisions_entity_view
settings:
view_mode: default
group_column: ''
group_columns: { }
group_rows: true
delta_limit: 0
delta_offset: 0
delta_reversed: false
delta_first_last: false
multi_type: separator
separator: ''
field_api_classes: false
plugin_id: field
filters:
status:
value: '1'
table: node_field_data
field: status
plugin_id: boolean
entity_type: node
entity_field: status
id: status
expose:
operator: ''
group: 1
type:
id: type
table: node_field_data
field: type
relationship: none
group_type: group
admin_label: ''
operator: in
value:
lesson: lesson
group: 1
exposed: false
expose:
operator_id: ''
label: ''
description: ''
use_operator: false
operator: ''
identifier: ''
required: false
remember: false
multiple: false
remember_roles:
authenticated: authenticated
reduce: false
is_grouped: false
group_info:
label: ''
description: ''
identifier: ''
optional: true
widget: select
multiple: false
remember: false
default_group: All
default_group_multiple: { }
group_items: { }
entity_type: node
entity_field: type
plugin_id: bundle
sorts: { }
title: ''
header: { }
footer: { }
empty: { }
relationships: { }
arguments: { }
display_extenders: { }
cache_metadata:
max-age: -1
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- url.query_args
- 'user.node_grants:view'
- user.permissions
tags:
- 'config:field.storage.node.field_paragraph'
page_1:
display_plugin: page
id: page_1
display_title: 'Embed Lesson(s)'
position: 1
display_options:
display_extenders: { }
path: embed/lesson
display_description: ''
arguments:
nid:
id: nid
table: node_field_data
field: nid
relationship: none
group_type: group
admin_label: ''
default_action: 'not found'
exception:
value: all
title_enable: false
title: All
title_enable: false
title: ''
default_argument_type: fixed
default_argument_options:
argument: ''
default_argument_skip_url: false
summary_options:
base_path: ''
count: true
items_per_page: 25
override: false
summary:
sort_order: asc
number_of_records: 0
format: default_summary
specify_validation: false
validate:
type: none
fail: 'not found'
validate_options: { }
break_phrase: true
not: false
entity_type: node
entity_field: nid
plugin_id: node_nid
defaults:
arguments: false
cache_metadata:
max-age: -1
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- url
- url.query_args
- 'user.node_grants:view'
- user.permissions
tags:
- 'config:field.storage.node.field_paragraph'
name: Lesson Embeds
description: 'Allows lesson content to be embedded into Penn State Canvas courses.'
package: Custom
type: module
dependencies:
- webform:webform
version: '8.x-6.0'
core: 8.x
\ No newline at end of file
services:
remove_x_frame_options_subscriber:
class: Drupal\lesson_embeds\EventSubscriber\RemoveXFrameOptionsSubscriber
tags:
- { name: event_subscriber }
\ No newline at end of file
<?php
namespace Drupal\lesson_embeds\EventSubscriber;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
use Symfony\Component\HttpKernel\KernelEvents;
class RemoveXFrameOptionsSubscriber implements EventSubscriberInterface {
public function RemoveXFrameOptions(FilterResponseEvent $event) {
$response = $event->getResponse();
$response->headers->remove('X-Frame-Options');
$response->headers->set('X-Frame-Options', 'ALLOW-FROM https://psu.instructure.com/');
$response->headers->set('Content-Security-Policy', 'frame-ancestors https://psu.instructure.com/');