Test - editing using the Rich Content Editor via a LTI tool
Test - editing using the Rich Content Editor via a LTI tool
Some text.
(t′+z′x′−iy′x′+iy′t′−z′)=(αβγδ)(t+zx−iyx+iyt−z)(α∗γ∗β∗δ∗)
This is a second test. Which contains two sentences.
I added a new sentence on 2016.07.19. To create a new Test 3 page.
If I selected the equation above and then invoke my editor button it passes the following to the LTI application:
params to /lti_launch {"oauth_consumer_key"=>"consumerkey", "oauth_signature_method"=>"HMAC-SHA1", "oauth_timestamp"=>"1469484655", "oauth_nonce"=>"AKyfVIkRGqZlwPj3CtIeHKuEz7YLWhOPj3ymENyq8", "oauth_version"=>"1.0", "context_id"=>"08d76eee8fbed3381e05c688c1f630b7d84cf06c", "context_label"=>"Chip", "context_title"=>"Chip sandbox", "custom_canvas_enrollment_state"=>"active", "custom_fooo"=>"125690", "ext_content_intended_use"=>"embed", "ext_content_return_types"=>"oembed,lti_launch_url,url,image_url,iframe", "ext_content_return_url"=>"https://kth.instructure.com/courses/11/external_content/success/external_tool_dialog", "ext_roles"=>"urn:lti:instrole:ims/lis/Instructor,urn:lti:role:ims/lis/Instructor,urn:lti:sysrole:ims/lis/User", "launch_presentation_document_target"=>"iframe", "launch_presentation_height"=>"500", "launch_presentation_locale"=>"en-GB", "launch_presentation_return_url"=>"https://kth.instructure.com/courses/11/external_content/success/external_tool_dialog", "launch_presentation_width"=>"500", "lti_message_type"=>"basic-lti-launch-request", "lti_version"=>"LTI-1p0", "oauth_callback"=>"about:blank", "resource_link_id"=>"08d76eee8fbed3381e05c688c1f630b7d84cf06c", "resource_link_title"=>"test app", "roles"=>"Instructor", "selection_directive"=>"embed_content", "text"=>"%3Cimg+class%3D%22equation_image%22+title%3D%22%5Cbegin%7Bpmatrix%7Dt%5E%7B%5Cprime%7D+%2B+z%5E%7B%5Cprime%7D+%26amp%3B+x%5E%7B%5Cprime%7D+-+iy%5E%7B%5Cprime%7D+%5Ccr+x%5E%7B%5Cprime%7D+%2B+iy%5E%7B%5Cprime%7D+%26amp%3B+t%5E%7B%5Cprime%7D+-+z%5E%7B%5Cprime%7D%5Cend%7Bpmatrix%7D+%3D%0A%5Cbegin%7Bpmatrix%7D%5Calpha+%26amp%3B+%5Cbeta+%5Ccr+%5Cgamma+%26amp%3B+%5Cdelta%5Cend%7Bpmatrix%7D%0A%5Cbegin%7Bpmatrix%7Dt+%2B+z+%26amp%3B+x+-+iy+%5Ccr+x+%2B+iy+%26amp%3B+t+-+z%5Cend%7Bpmatrix%7D%0A%5Cbegin%7Bpmatrix%7D%5Calpha%5E%7B%2A%7D+%26amp%3B+%5Cgamma%5E%7B%2A%7D+%5Ccr+%5Cbeta%5E%7B%2A%7D+%26amp%3B+%5Cdelta%5E%7B%2A%7D+%5Cend%7Bpmatrix%7D%22+src%3D%22%2Fequation_images%2F%25255Cbegin%25257Bpmatrix%25257Dt%25255E%25257B%25255Cprime%25257D%252520%252B%252520z%25255E%25257B%25255Cprime%25257D%252520%252526%252520x%25255E%25257B%25255Cprime%25257D%252520-%252520iy%25255E%25257B%25255Cprime%25257D%252520%25255Ccr%252520x%25255E%25257B%25255Cprime%25257D%252520%252B%252520iy%25255E%25257B%25255Cprime%25257D%252520%252526%252520t%25255E%25257B%25255Cprime%25257D%252520-%252520z%25255E%25257B%25255Cprime%25257D%25255Cend%25257Bpmatrix%25257D%252520%25253D%25250A%25255Cbegin%25257Bpmatrix%25257D%25255Calpha%252520%252526%252520%25255Cbeta%252520%25255Ccr%252520%25255Cgamma%252520%252526%252520%25255Cdelta%25255Cend%25257Bpmatrix%25257D%25250A%25255Cbegin%25257Bpmatrix%25257Dt%252520%252B%252520z%252520%252526%252520x%252520-%252520iy%252520%25255Ccr%252520x%252520%252B%252520iy%252520%252526%252520t%252520-%252520z%25255Cend%25257Bpmatrix%25257D%25250A%25255Cbegin%25257Bpmatrix%25257D%25255Calpha%25255E%25257B%2A%25257D%252520%252526%252520%25255Cgamma%25255E%25257B%2A%25257D%252520%25255Ccr%252520%25255Cbeta%25255E%25257B%2A%25257D%252520%252526%252520%25255Cdelta%25255E%25257B%2A%25257D%252520%25255Cend%25257Bpmatrix%25257D%22+alt%3D%22%5Cbegin%7Bpmatrix%7Dt%5E%7B%5Cprime%7D+%2B+z%5E%7B%5Cprime%7D+%26amp%3B+x%5E%7B%5Cprime%7D+-+iy%5E%7B%5Cprime%7D+%5Ccr+x%5E%7B%5Cprime%7D+%2B+iy%5E%7B%5Cprime%7D+%26amp%3B+t%5E%7B%5Cprime%7D+-+z%5E%7B%5Cprime%7D%5Cend%7Bpmatrix%7D+%3D%0A%5Cbegin%7Bpmatrix%7D%5Calpha+%26amp%3B+%5Cbeta+%5Ccr+%5Cgamma+%26amp%3B+%5Cdelta%5Cend%7Bpmatrix%7D%0A%5Cbegin%7Bpmatrix%7Dt+%2B+z+%26amp%3B+x+-+iy+%5Ccr+x+%2B+iy+%26amp%3B+t+-+z%5Cend%7Bpmatrix%7D%0A%5Cbegin%7Bpmatrix%7D%5Calpha%5E%7B%2A%7D+%26amp%3B+%5Cgamma%5E%7B%2A%7D+%5Ccr+%5Cbeta%5E%7B%2A%7D+%26amp%3B+%5Cdelta%5E%7B%2A%7D+%5Cend%7Bpmatrix%7D%22+%2F%3E", "tool_consumer_info_product_family_code"=>"canvas", "tool_consumer_info_version"=>"cloud", "tool_consumer_instance_contact_email"=>"notifications@instructure.com", "tool_consumer_instance_guid"=>"ySt5cF5tiEU8j5oIzxT2J98caTu54Vl6y9s6gYdS:canvas-lms", "tool_consumer_instance_name"=>"KTH Royal Institute of Technology", "user_id"=>"97d0ab13fafc432d23aa6cd73fc51d769d651f21", "oauth_signature"=>"s4lMXqhAOR1bEK+SdL+nve5v8NA="}
See if we can select the following paragraph:
{"Characters": 339, "Textatistic.counts": {"polysyblword_count": 0, "word_count": 64, "sent_count": 6, "notdalechall_count": 10, "sybl_count": 79, "char_count": 272}, "Textatistic.flesch_score": 91.58020833333336, "Junk": "Chip", "Words": 64}
This passes the following to the LTI application:
params to /lti_launch {"oauth_consumer_key"=>"consumerkey", "oauth_signature_method"=>"HMAC-SHA1", "oauth_timestamp"=>"1469485332", "oauth_nonce"=>"cARtXae1EEaS4kGAvD5qakwPmFJs2pjGH3xCPYc", "oauth_version"=>"1.0", "context_id"=>"08d76eee8fbed3381e05c688c1f630b7d84cf06c", "context_label"=>"Chip", "context_title"=>"Chip sandbox", "custom_canvas_enrollment_state"=>"active", "custom_fooo"=>"125690", "ext_content_intended_use"=>"embed", "ext_content_return_types"=>"oembed,lti_launch_url,url,image_url,iframe", "ext_content_return_url"=>"https://kth.instructure.com/courses/11/external_content/success/external_tool_dialog", "ext_roles"=>"urn:lti:instrole:ims/lis/Instructor,urn:lti:role:ims/lis/Instructor,urn:lti:sysrole:ims/lis/User", "launch_presentation_document_target"=>"iframe", "launch_presentation_height"=>"500", "launch_presentation_locale"=>"en-GB", "launch_presentation_return_url"=>"https://kth.instructure.com/courses/11/external_content/success/external_tool_dialog", "launch_presentation_width"=>"500", "lti_message_type"=>"basic-lti-launch-request", "lti_version"=>"LTI-1p0", "oauth_callback"=>"about:blank", "resource_link_id"=>"08d76eee8fbed3381e05c688c1f630b7d84cf06c", "resource_link_title"=>"test app", "roles"=>"Instructor", "selection_directive"=>"embed_content", "text"=>"%7B%22Characters%22%3A+339%2C+%22Textatistic.counts%22%3A+%7B%22polysyblword_count%22%3A+0%2C+%22word_count%22%3A+64%2C+%22sent_count%22%3A+6%2C+%22notdalechall_count%22%3A+10%2C+%22sybl_count%22%3A+79%2C+%22char_count%22%3A+272%7D%2C+%22Textatistic.flesch_score%22%3A+91.58020833333336%2C+%22Junk%22%3A+%22Chip%22%2C+%22Words%22%3A+64%7D", "tool_consumer_info_product_family_code"=>"canvas", "tool_consumer_info_version"=>"cloud", "tool_consumer_instance_contact_email"=>"notifications@instructure.com", "tool_consumer_instance_guid"=>"ySt5cF5tiEU8j5oIzxT2J98caTu54Vl6y9s6gYdS:canvas-lms", "tool_consumer_instance_name"=>"KTH Royal Institute of Technology", "user_id"=>"97d0ab13fafc432d23aa6cd73fc51d769d651f21", "oauth_signature"=>"JLlC1d7VPju1kPtTs3JWSzeLceE="}
Some text to modify:
new_url=params['ext_content_return_url']+"?return_type=url&url="+CGI::escape("http://localhost:14921/text_to_return.html")+"&title="+CGI::escape("inserted text")+"&text="+CGI::escape(string_to_insert)ew_url=params['ext_content_return_url']+"?return_type=url&url="+CGI::escape("http://localhost:14921/text_to_return.html")+"&title="+CGI::escape("inserted text")+"&text="+CGI::escape(string_to_insert)
<p>Some text to insert <a href=" http://imscatalog.org/">catalog of certified products</a> junkk junk and more junk</p> Links to an external site. - after inserting url
More text to modify: (this time with oembed):
More text - insert with img
More text - insert iframe: