themeum / tutor Goto Github PK
View Code? Open in Web Editor NEWA complete WordPress LMS plugin to create any e-learning website easily.
Home Page: https://www.themeum.com/product/tutor-lms/
License: GNU General Public License v3.0
A complete WordPress LMS plugin to create any e-learning website easily.
Home Page: https://www.themeum.com/product/tutor-lms/
License: GNU General Public License v3.0
Hi!
I have a problem, because when I want to put RODO information about what I will do with my student data below the short code on the student registration page, only the registration form appears. Any other WordPress page building blocks are not displayed.
I'm using:
I'm trying to add instructors over WordPress Backend, all works fine except the image for the instructor, never get saved.
I get fixed this behavior by doing these simple modifications.
[PLUGIN FOLDER]/views/metabox/user-profile-fields.php
Line 48 (Fix field name)
From:
<input type="hidden" name="_tutor_profile_photo_field” value="<?php echo $user_profile_photo; ?>">
To:
<input type="hidden" name="_tutor_profile_photo" value="<?php echo $user_profile_photo; ?>">
[PLUGIN FOLDER]/classes/User.php
Line 109 (Add meta post updater)
From:
public function profile_update($user_id){
$_tutor_profile_job_title = sanitize_text_field(tutor_utils()->avalue_dot('_tutor_profile_job_title', $_POST));
$_tutor_profile_bio = wp_kses_post(tutor_utils()->avalue_dot('_tutor_profile_bio', $_POST));
update_user_meta($user_id, '_tutor_profile_job_title', $_tutor_profile_job_title);
update_user_meta($user_id, '_tutor_profile_bio', $_tutor_profile_bio);
}
To:
public function profile_update($user_id){
$_tutor_profile_job_title = sanitize_text_field(tutor_utils()->avalue_dot('_tutor_profile_job_title', $_POST));
$_tutor_profile_bio = wp_kses_post(tutor_utils()->avalue_dot('_tutor_profile_bio', $_POST));
$_tutor_profile_image = wp_kses_post(tutor_utils()->avalue_dot('_tutor_profile_photo', $_POST));
update_user_meta($user_id, '_tutor_profile_job_title', $_tutor_profile_job_title);
update_user_meta($user_id, '_tutor_profile_bio', $_tutor_profile_bio);
update_user_meta($user_id, '_tutor_profile_photo', $_tutor_profile_image);
}
Please send this update because I made these modifications over the plugin if you send another update with this change I get bugged again.
I have a PRO account.
I have started using the Tutor LMS plugin and must say it really makes life easy.
I have encountered a UI error that I am not able to fix.
I have 2 courses as of now and want to list them using the "[tutor-course]" shortcode. But its giving some HTML issue.
Please see the UI below (2nd course comes below the 1st). Also attaching the HTML output. As you can see from the HTML, the 2nd course
How to reproduce:
Quiz get submitted. (Which should not be the case.)
pls provide License Key
[email protected]
itiexam.com
Hi.
I'm using Tutor with WooCommerce. Recently I discovered that right after adding an item to a cart the page refreshes causing an error of triggering another item to cart addition, and, in my case, sometimes resulting in an example WooCommerce notification:
You cannot add another "Title" to your cart.
Using a developer tools I've found out the code that's causing the issue:
// Refresh page after coming back to course archive page from cart
var archive_loop = $('.tutor-course-loop');
if(archive_loop.length>0){
window.sessionStorage.getItem('tutor_refresh_archive')==='yes' ? window.location.reload() : 0;
window.sessionStorage.removeItem('tutor_refresh_archive');
archive_loop.on('click', '.tutor-loop-cart-btn-wrap', function(){
window.sessionStorage.setItem('tutor_refresh_archive', 'yes');
});
}
It really look like a quite serious bug to me. I assume the code is triggered by adding a query parameter and I'm quite sure it shouldn't be called in this specific situation. Is it really necessary by the way? And do You have an idea how can I fix the issue myself right now, without manually editing the plugin code?
I also do take into consideration the there could be some bug on my side, but I haven't really found anything and this looks like a reasonably possible cause of the issue to me.
Line 100 in 1225522
https://wordpress.org/support/topic/database-structure-and-api-question/
In this question is said that you had plans on creating an API on mid-2020. How is that going?
DEBUGGING
This seems to be the problem:
tutor_utils()->do_enroll($course_id, $payment_id);
Should pass also $user_id somehow, otherwise get_user_id calls get_current_user_id() which loads the current user id (the Admin) instead of the student id.
How to reproduce:
Interesting thing is that after another attempt I am able to see my previous attempts as long as I stay in this Quiz lesson. Changing lesson causes all attempts to be unavailable.
The course filters are not returning any listings if the user has the tutor instructor role. Works fine with students (subscriber role) or admins.
Having a long link for Vimeo video like https://vimeo.com/642264752/2b99aa08e8 is not accepted by TutorLMS. Instead showing that video TutorLMS is changing that link to https://player.vimeo.com/video/642264752 while the correct should be https://player.vimeo.com/video/642264752**?h=2b99aa08e8**
Chained quizzes using if/then logic are valuable in providing a personalized experience for students.
For example, if a student gets a question wrong (let's say this question has a tag called "Algebra"), then we should be able to add logic that shows them another question with the same tag or set of tags.
A more advanced implementation would save the question tags along with frequency correct/incorrect with the student's profile. Then a simple algorithm can be used to recommend their next quiz or generate a quiz based on certain parameters.
Is it possible to export LMS Data reporting to Excel file?
Handling a site for a client with WooCommerce installed alongside Tutor Pro. The following error repeatedly occurs.
[07-Oct-2022 02:21:35 UTC] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND course_id = 1767 AND result_for != 'final'' at line 4 for query SELECT wp_tutor_gradebooks_results .*, grade_config FROM wp_tutor_gradebooks_results LEFT JOIN wp_tutor_gradebooks ON wp_tutor_gradebooks_results.gradebook_id = wp_tutor_gradebooks.gradebook_id WHERE user_id = AND course_id = 1767 AND result_for != 'final' made by do_action_ref_array('action_scheduler_run_queue'), WP_Hook->do_action, WP_Hook->apply_filters, ActionScheduler_QueueRunner->run, ActionScheduler_QueueRunner->do_batch, ActionScheduler_Abstract_QueueRunner->process_action, ActionScheduler_Action->execute, do_action_ref_array('woocommerce_scheduled_subscription_payment'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Subscriptions_Manager::prepare_renewal, WC_Subscriptions_Manager::process_renewal, WC_Subscription->update_status, WC_Order->save, WC_Subscription->status_transition, do_action('woocommerce_subscription_status_updated'), WP_Hook->do_action, WP_Hook->apply_filters, TUTOR_WCS\WCSubscriptions->update_enrollment_status, TUTOR\Utils->update_enrollments, TUTOR\Utils->delete_course_progress, do_action('delete_tutor_course_progress'), WP_Hook->do_action, WP_Hook->apply_filters, TUTOR_GB\GradeBook->gradebook_generate, get_generated_gradebook
The closest I can dig this is to /var/www/html/wp-content/plugins/tutor-pro/includes/functions.php: line 24 apparently user_id being 0, it's using an empty value in the SQL? (Not an SQL expert).
Active Plugins (amongst others)
...
tutor,active,none,2.0.10
tutor-lms-certificate-builder,active,none,1.0.0
tutor-lms-elementor-addons,active,none,2.0.5
tutor-pro,active,available,2.0.9
woocommerce,active,none,6.9.4
woocommerce-services,active,none,1.26.3
woocommerce-gateway-stripe,active,none,6.8.0
woocommerce-subscriptions,active,none,4.5.1
...
How do I add a video to a quiz?
I have an <iframe> but after trying to save everything goes out of question description.
I want to record the content of the question in a video and give qiuz to each question. The videos will be different.
It is important to me that there is a player for questions.
Hello! I am a programming teacher and it would be great to have an opportunity to use either MarkDown or HTML code tags to put something like that in questions:
int a = 4;
a++;
Right now it looks like this ```cpp int a = 4; a++; ```
It doesn't work with HTML either.
Another option is to have at least a possibility to upload an image to a question, not only answers (like multiple choice).
Unable to make finishing a quiz mandatory before going to the next topic/lesson.
This is a serious issue. My younger students need to to be forced to take and finish a quiz.
Hello,
I really like the plugin and I have one small issue. Right now it is not possible to mark a lesson as completed. This because the progress bar, where the complete button is placed, is only visible for mobile users. The progess bar is also only visible for mobile.
I think this is very important, because right now desktop users can not set a lesson to completed.
Please add Telegram to social sharing buttons 🙏
https://t.me/share/url?url={url}&text={text}
/**
* @param string $url Absolute URL to share, e.g. "https://example.com/path/to/article?with=params"
* @param string $text Optional comment to share URL with, e.g. "Check out this article!"
* @return string Button HTML markup, feel free to modify to your taste
*/
function telegramForwardButton($url, $text = '') {
$share_url = 'https://t.me/share/url?url='.rawurlencode($url).'&text='.rawurlencode($text);
return "<a href=\"{$share_url}\">Share</a>";
}
Hello!
I noticed that EU people need checkboxes to accept the privacy policy. Can you add the possibility to add text next to every possible place to enter text, e.g. registration form? (Not counting in quizzes).
Hello together,
using woocommerce as monetarization works fine for all payment methods i tested ( six different ones) but when using amazon pay the payment sucessfully finished in woocommerce but does not lead enroll the user in the course he/she brought with tutor lms.
Can you give me a hint what the reason could be?
woocommerce_new_order_item
is not fired with amazon pay, but I do not know how to confirm that.SELECT * FROM `wp_posts` WHERE `post_status` LIKE "completed"`
I'm using c430863
In order to make this possible is needed to avoid students to be enrolled in the first place, which means after they buy a course.
The filter hook tutor_enroll_data would be the first choice but...that's not possible with EDD (no idea about the other payment options) because the function edd_update_payment_status calls complete_course_enroll at the end (so the course starts immediately after the payment).
This is what I had to do since no hook was present in the EDD code to stop the enrolment.
add_action('edd_update_payment_status', function( $payment_id, $new_status, $old_status ){
global $wpdb;
// when a new payment is completed
if( $old_status=='pending' && $new_status=='publish' ) {
$enrolled_ids_with_course = tutor_utils()->get_course_enrolled_ids_by_order_id($payment_id);
if ($enrolled_ids_with_course){
$enrolled_ids = wp_list_pluck($enrolled_ids_with_course, 'enrolled_id');
if (is_array($enrolled_ids) && count($enrolled_ids)){
foreach ($enrolled_ids as $enrolled_id){
// tutor_utils()->complete_course_enroll($payment_id);
// this last call of "edd_update_payment_status" makes post_status=='complete': we want to revert that to pending so...
// ...we immediately switch back the enrollment status to 'pending'
$wpdb->update( $wpdb->posts, array( 'post_status' => 'pending' ), array( 'ID' => $enrolled_id ) );
}
}
}
}
}, 99, 3);
// if priority>10 fires after:
// add_action('edd_update_payment_status', array($this, 'edd_update_payment_status'), 10, 3);
// https://github.com/themeum/tutor/blob/54984cd5e81e35dc9ab0b5809e2c218ef9cfc4e9/classes/TutorEDD.php
Hope this can help others or to improve LMS Tutor 🙏
Course category archive works fine but course-tag
points to default blog tag layout. Putting course tag condition fixes the issue . https://github.com/themeum/tutor/blob/master/classes/Template.php#L61 by adding new tax condition $course_tag = get_query_var('course-tag');
The login form/button on the course page is redirecting to the student dashboard instead of the course page itself.
I fixed it by changing the content of else condition on line 69 with the following line of codes in classes/FormHandler.php
else { //Redirect page $redirect_page = tutils()->array_get('redirect_to', $_REQUEST); if ( ! $redirect_page){ $redirect_page = tutor_utils()->tutor_dashboard_url(); } tutor_redirect_back(apply_filters('tutor_login_redirect_url', $redirect_page)); }
Recent quiz update in 1.8.10 is causing below error -
Created a quiz with single choice questions. After opening the quiz when user selects the and – clicks on the “Answer & nExt question” button. Nothing happens.
WordPress : 5.7.2
Tutor LMS : 1.9.1
Checked in both chrome and firefox latest version.
Exception in the inspect -
tutor-front.js?ver=1.9.1:789 Uncaught TypeError: Cannot read property 'split' of undefined
at feedback_response (tutor-front.js?ver=1.9.1:789)
at HTMLButtonElement. (tutor-front.js?ver=1.9.1:607)
at HTMLDocument.dispatch (jquery.min.js?ver=3.5.1:2)
at HTMLDocument.v.handle (jquery.min.js?ver=3.5.1:2)
Update which is causing the exception -
1608220
assets/js/tutor-front.js
Hey there,
First things First I am a fan of this great LMS plugin. I like the way the developer folks have contributed and developed the plugin and provided as a free and open source great looking LMS plugin like a cherry on a cake. Coming to the issue I just noted that the LMS plugin is using plyr JS plugin which is also a great alternative to HTML5 video but the player used in the plugin doesn't show up the controls like mute and volume controls. At the beginning it was displaying the full screen and settings menu for video playback only.
To resolve this issue I have followed the documentation for the plugin on GitHub repo.
There I found that we can add options directly for the player controls while initializing the plugin. so I have tweaked the given JS code on tutor-front.js
file.
Below is the code snippet for reference:
const player = new Plyr('#tutorPlayer', {
controls: [
'play-large', // The large play button in the center
'restart', // Restart playback
'rewind', // Rewind by the seek time (default 10 seconds)
'play', // Play/pause playback
'fast-forward', // Fast forward by the seek time (default 10 seconds)
'progress', // The progress bar and scrubber for playback and buffering
'current-time', // The current time of playback
'duration', // The full duration of the media
'mute', // Toggle mute
'volume', // Volume control
'captions', // Toggle captions
'settings', // Settings menu
'pip', // Picture-in-picture (currently Safari only)
'airplay', // Airplay (currently Safari only)
'download', // Show a download button with a link to either the current source or a custom URL you specify in your options
'fullscreen', // Toggle fullscreen
]
});
I hope this small solution makes sense for the controls to show up. All the controls are visible on my plugin player.
Thanks 😄
The quiz validation doesn't use the translation function, so it is not possible to translate the answer.
tutor/assets/js/tutor-front.js
Line 682 in aa686c7
I can't find a way to hook into a single pass or fail event for quizzes. I can see that the pass/fail(let's call it the quiz's status) is calculated just in time, for example here:
tutor/templates/dashboard/my-quiz-attempts.php
Lines 34 to 37 in 97e4509
I have considered hooking into tutor_quiz/attempt_ended
and calculating it like the example above to decide whether a student has passed or failed the quiz.
However, if a manual review is required, as in https://github.com/themeum/tutor/blob/master/classes/Quiz.php#L309, then the hook above isn't reliable to hook into a pass/fail event. So, I started looking at tutor_quiz_review_answer_after
and check if the attempt has ended to calculate pass/fail. This runs for each answer though.
Are there any thoughts on running the tutor_quiz/attempt_ended
hook at the end of a manual review?
Or maybe, about adding something on the lines of tutor_quiz/attempt_passed
or tutor_quiz/attempt_failed
actions?
I'm a developer too so can help with code contributions, if needed.
https://wordpress.org/support/topic/gutenberg-editor-for-lesson-and-quiz/
I have a case where I want to copy and paste content from Google Docs into Lesson, where this only works when using the Gutenberg Editor, while for now Lesson only supports using the Classic Editor, and it makes it difficult for me to move content from Google Docs into Lesson, I’ve tried several plugins like Jetpack and Mammoth Docx Converter, but they didn’t live up to my expectations (there are still some bugs).
I have found the solution by changing the tutor/classes/Post_types.php
file
below the following code
Line 191 in 7111622
it becomes
'show_in_menu' => false,
'show_in_rest' => true,
but I hope this can become official support from Themeum without me having to manually edit every time there is an update.
Hi !
Tutor LMS is great and I am glad we bought the full license for my school.
However, some things could be improved for real world lectures in schools (and not online lecture) :
Cheers,
Next and Previous links on a lesson don't always link to the correct Lesson or Quiz, and will default to the last Lesson or Quiz in the topic.
Rearrange the order, save, and then change it back.
Many quizzes require questions to be grouped with a certain prompt. For example, I might display a chart or a paragraph of text followed by three questions about it. The SAT and ACT both use these grouped questions heavily and this feature is extremely valuable.
Hello friends of Tutor Pro LMS.
My name is Aragon Lima, I'm from Brazil and I'm having a problem with redirection and slugs with the Nav Bar's that are on the Course's page of the student who is enrolled.
I used the CTP Slug Change plugin to change the slug Courses for our "Cursos" ... It worked normal for other pages, however, for these nav bars it didn't work.
Look this Video https://www.loom.com/share/e5599253b4204cf2a7c1c92cd104a241
Each a new student tries to register and they fill out their name, username, email, and password then click register. An error message comes up saying "Error: Please enter a password". I check this several times myself by trying different passwords to put in and the same message keeps coming up. Can someone please help me with this issue
Hi,
can you please help me again?
I need to change this button text
Originally posted by @Ayan008 in #46 (comment)
Hi
For instructor archive page is_author()
return false
. For this reason custom breadcumb and page title isn't working.
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.