mhmdsalah
Forum Replies Created
-
Thank you for your response.
I just want to double check something regards theWPML Add-onplugin will it allows me to translate the Curriculum section on the course?
I have tried many plugins but they all fail to translate this part due to how this part stored in the database as JSON type.
thank you.


Here is all Sublanguage config
I use
Twenty Twenty-Fivetheme. but I think the problem with REST APIs only.
What I find strange is that the LeanPress endpoints itself are working great, the problem happen only with the add-ons.- This reply was modified 1 year, 4 months ago by mhmdsalah.
Hello, Thanks for the replay.
Sublanguage version: 2.12
This problem happens to me when i use the REST API of learnpress.
To reproduce first make a request to thetokenendpoint to get the token:"/learnpress/v1/token"
Then use this token to send request to any of the Course Review and Course Wishlist add-ons for example you can try this endpoint:"/learnpress/v1/wishlist/course/(?P<id>[\\d]+)"
You will get:{
code: "lp_jwt_auth_bad_iss",
message: "The iss do not match with this server",
data: {
status: 401,
},
}Interesting, this problem happened after I installed Sublanguage plugin. I disabled it now and the problem fixed.
Does anyone know why a problem like this might happens?Thanks @dino.
regard the first configuration:
“Reach to balance: Takes into account the user’s total point balance. When you reach the amount that has been configured in the event you would earn the achievement.”
Can you point me to how to do it?
Hi Dioni Sánchez
I’m confused. what is the purpose of gamipress-user-earning endpoint then? what if I don’t use it?Thank you for your fast response.
How to setup the first one? I think to setup the second one by using the “Minimum Points Required” option when making the achievement.
The problem I have is when I set the minimum points required for an achievement to 10 for example, and I then bulk award the user by points more or equal to this achievement he doesn’t get the achievement.simply the curl should be like this:
curl "https://lms.local/wp-json/llms/v1/students/2/enrollments/66" \ -X POST \ -H "authorization: Basic Y2tfYmFkNzg1ODg4NDEyNTJmYzU5OTI0MzQ0NWY0YzVmZTcwYzlkMjE1OTpjc184ZDNkYTIzNGIwNGY3MWEyN2QwYWI3MGQ0YjUxN2M2Y2JjNDNmY2Zj"Yes, I did.
Thank you for your response, I found the problem which was to request my local using HTTPS, not HTTP.
I believe lifter-lms shouldn’t enforce https in development or at least the response message should be clear about the problem with the https connections.- This reply was modified 2 years, 3 months ago by mhmdsalah.
This is the curl:
curl "http://lms.local/wp-json/llms/v1/students/2/enrollments/66" \ -X POST \ -H "authorization: Basic Y2tfYmFkNzg1ODg4NDEyNTJmYzU5OTI0MzQ0NWY0YzVmZTcwYzlkMjE1OTpjc184ZDNkYTIzNGIwNGY3MWEyN2QwYWI3MGQ0YjUxN2M2Y2JjNDNmY2Zj"Note, I tried using the
Header Authenticationalso it didn’t work:private static api: AxiosInstance = axios.create({ baseURL: process.env.NEXT_PUBLIC_WORDPRESS_URL +/wp-json/llms/v1, headers: { "X-LLMS-CONSUMER-KEY": process.env.LIFTER_LMS_CONSUMER_KEY as string, "X-LLMS-CONSUMER-SECRET": process.env .LIFTER_LMS_CONSUMER_SECRET as string, }, });Forum: Plugins
In reply to: [Da Reactions] Question about the plugin licenseHello Daniele Alessandra, thanks for your response.
Currently, the Da Reaction plugin identifies the user by User ID (if they are logged in) or by a token (stored in the user’s cookies).
My use case is a little different. I’m developing a Headless WordPress App with Next.js, and I have a .NET backend that contains all our user data. So, my stack is as follows:
- Next.js: as the frontend application.
- .NET: as my backend with a database containing all my users’ info.
- WordPress: as the content management system for content writers to write articles.
I want to identify users when they like a post, but I don’t want to log my users into WordPress. So, according to the plugin’s current implementation, all my users are anonymous.
My solution to identify my users was this: passing the User ID from my Next.js server to the Da Reaction Endpoint.
To prevent unauthorized actions, I will add some kind of API Key that is only known to the WordPress backend and Next.js, and pass it as a header with my request along with the User ID (after verifying the user) using my Next.js server.
I’m new to WordPress and the Headless approach. What do you think of this? Also, I’m not completely sure if the Da Reaction package plays nicely with Headless WordPress. I just played with it.