saltbox / wordpress-lti-consumer Goto Github PK
View Code? Open in Web Editor NEWUse Wordpress as an LTI Consumer to launch remote learning content
License: GNU General Public License v3.0
Use Wordpress as an LTI Consumer to launch remote learning content
License: GNU General Public License v3.0
You are using wp_get_current_user and try to get
the user_id as
'user_id' => $current_user->user_id
But the wordpress api should be $current_user->ID
http://codex.wordpress.org/Function_Reference/wp_get_current_user
return array(
'user_id' => $current_user->ID,
'lis_person_contact_email_primary' => $current_user->user_email,
'lis_person_name_given' => $current_user->user_firstname,
'lis_person_name_family' => $current_user->user_lastname,
);
And I think the lti_launch_func only will be executed if there are a user logged in
Bests regards
In the shortcode, adding a configuration_url pointing to a waxlrs XML returns an error.
[lti-launch consumer_key=yourconsumerkey secret_key=yoursecretkey display=iframe
configuration_url=https://uomedtest.waxlrs.com/lti?u=https://uomedtest.waxlrs.com/embed/mostpopular
resource_link_id=testcourseplacement1]
This problem isn't so much with the wordpress-lti-consumer code, though. The problem seems to be that waxlrs returns a 404 Not Found if the Accept: application/xml
HTTP header is being sent.
This gist isolates just the part of the code making the file_get_contents call to the waxlrs, reproducing the problem:
https://gist.github.com/pascallaliberte/21d3eb14ec6e5a8dec9a
This gist, however, has the Accept: application/xml
removed, which works.
https://gist.github.com/pascallaliberte/542212dbcc6562eeaf6c
When using the iframe shortcode in the output of an admin-side dashboard widget, the iframe is created but nothing is displayed inside the iframe.
It looks like the launch.js
script isn't referenced on the admin-side, which is needed for the form (preceding the iframe) to have its parameters posted to the iframe.
Here's some code to create an admin-side dashboard widget (OAuth keys removed):
https://gist.github.com/pascallaliberte/d86ef047f2c064f3717d
Documentation on creating dashboard widgets:
http://codex.wordpress.org/Dashboard_Widgets_API
It was reported that OAuth signature verification failed when launching http://ltiapps.net/test/tp.php . There might be an issue with signature verification when the outputted form fields aren't ordered properly.
This might just be a documentation thing, or possibly it could be detected, or something. They don't work properly with newlines present in the editor (even in plain text mode) because br tags get inserted.
The lti_version
must be either "LTI-1p0" or "LTI-2p0", regardless of the sub-version.
See
It is showing atal error: Maximum function nesting level of '100' reached, aborting! in D:\wamp\wamp\www\wordpress\wp-includes\load.php on line 886 when I client on "Add New" in this plugin and also below error message.
Warning: call_user_func() expects parameter 1 to be a valid callback, function 'sb_lti_content_inner_custom_box' not found or invalid function name in D:\wamp\wamp\www\wordpress\wp-admin\includes\template.php on line 1037
Can you please guide me in configuring this plugin.
I am using latest version of Wordpress..
Right now there's just a big error
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.