Posted on Leave a comment

Reimagining My Courses

Without a doubt, the My Courses page is the central hub of your learners’ online course-taking experience. It’s where they go to access their courses, and generally bask in the glory of all the progress they’ve made so far.

And let’s face it…this page was overdue for a little ❤️.

That’s why in Sensei LMS 3.10, My Courses has been updated with a cleaner, fresher look. Not only that, but we’ve also shifted more control over to you by giving you the customization tools you need to really make My Courses sparkle and shine.

So long shortcode, hello blocks!

My Courses page - List view

The My Courses page harnesses the power of three new blocks – Learner Messages Button, Learner Courses and View Results.

Learner Messages Button

The Learner Messages Button block enables learners to view their private messages with the teacher. This block is only displayed if the learner is logged in and private messaging is enabled in Sensei’s settings. Clicking the button takes the learner to a page that shows all of their communication with the teacher.

Learner Courses

The Learner Courses block displays a list of courses the learner is currently enrolled in. There are separate views for filtering by active or completed courses, and the block’s settings enable you to customize colours and select which elements to display.

View Results

The View Results block is added to My Courses automatically once a course has been completed, but it can also be added to any of your individual courses. Clicking the button takes the learner to a page that shows how well they performed in each lesson of the course.

What Happens to My Existing My Courses Page?

Your existing My Courses page is not affected when updating to 3.10. If you’d like to convert it to use the new blocks, you can do that by first deleting the [sensei_users_courses]shortcode, and then adding the desired blocks from the block inserter:

Sensei blocks available on the My Courses page

What Else is in This Release?

Here are some other changes you’ll find in 3.10:

  • For lessons with prerequisites, display the first prerequisite lesson that needs to be completed in the prerequisite notice.
  • Only include questions belonging to the current teacher when adding category questions.

See the full list of changes.

To update, please head on over to Dashboard → Updates in the WordPress admin.

Please note: While we have thoroughly tested this release, it’s always possible that we’ve missed something. We recommend that you test the update on a staging site before updating your live site.

For Developers

New Filter

sensei_filter_category_questions_by_author – Whether category questions should be filtered by author.

Deprecated Code

  • Sensei_Frontend::sensei_get_user_quiz_answers – Use Sensei_Quiz::get_user_answers instead.
  • Sensei_Quiz::stop_quiz_questions_loop – No replacement.
  • Sensei_Assets::override_script – No replacement.
  • Sensei_Assets::wp_compat – No replacement.
Posted on 1 Comment

A New Default Quiz Editing Experience

Sensei LMS 3.9 is out and brings with it a brand new way to manage quizzes – right inside the editor!

Introducing the Quiz Block

Both new and existing quizzes are now edited using the Quiz block. This block is automatically added when a new lesson is created, but can be removed if you don’t need it. Existing quizzes are also switched over to automatically use the new block:

Quiz block

The Quiz block supports the same functionality as the old meta boxes, including question types, settings, and selecting existing questions or category questions:

Quiz block - Inserter

Blocks are also used when editing an individual question residing in the question bank:

Question block

The view that the learner sees remains the same, and quizzes are still displayed on a separate page as before.

To learn more about how to use the Quiz block, please see our documentation on quizzes and questions.

What If I Don’t Want to Use the Quiz Block?

If you’d prefer to continue to use the meta boxes to manage quizzes, you can disable the Quiz block by using the following code snippet:

add_filter( 'sensei_quiz_enable_block_based_editor', '__return_false' );

What Else is in This Release?

Here are some other improvements you’ll find in 3.9:

  • We added a filter to enable customizing the course and lesson block templates.
  • Only courses belonging to the current teacher are shown on the Analysis page.
  • Teachers are no longer able to add another teacher’s questions to a quiz.
  • When the course teacher is changed, the author of any associated quiz questions is also updated to the new teacher when it makes sense to do so.
  • We’ve added the ability to set a question to Draft status.

See the full list of changes.

Developers: For deprecations, please see the beta release post.

To update, please head on over to Dashboard → Updates in the WordPress admin.

Please note: While we have thoroughly tested this release, it’s always possible that we’ve missed something. We recommend that you test the update on a staging site before updating your live site.

Posted on Leave a comment

Sensei LMS 3.9 Beta – Quiz & Question Blocks

Sensei LMS 3.9 is now available for testing. This release delivers an all-new quiz editing experience that uses blocks to manage quizzes right inside the lesson editor:

Quiz block

The quiz block supports the existing question types you’re already familiar with — multiple choice, true/false, gap fill, single line, multi line and file upload — as well as selecting existing questions from the question bank:

Quiz block - Existing questions

Although blocks will be the default quiz editing experience going forward, there are a couple of scenarios in which the legacy meta boxes will continue to be used:

See what else is in this release.

Testing Sensei LMS

*Please note that the test site integrates with Smartlook to record your visit. Smartlook is GDPR compliant out of the box, and any recordings will be deleted automatically after 1 month.

If you find a bug, please submit an issue on Github or leave a comment on this post. Our tentative release date is March 25th.

As this is a beta release, please test it on a staging site and not your live site. If you don’t have a staging site, you can use the WP Staging plugin to create one.

For Developers

Potentially Breaking Changes

  • Markup for the Complete Quiz, Save Quiz and Reset Quiz buttons has changed from input to button.
  • Specificity of the quiz button styles has increased (i.e. .quiz => .quiz:not(.quiz-blocks)).

New Filters

New Actions

Thank you to all our testers and contributors!

Posted on Leave a comment

All-New Conditional Content & Lesson Actions Blocks

Sensei LMS 3.8

Sensei LMS 3.8 is available now and introduces two new blocks – Conditional Content and Lesson Actions.

Conditional Content

The Conditional Content block, available on the course page, is very handy when you’d like to display content to a specific group of people. For example, you may want to write some sales copy to entice people to enrol in your course, but not display it to those who are already enrolled. The Conditional Content block makes this possible!

To configure the block, just add some child blocks inside it and set the visibility condition to only display the content when the person is enrolled in the course, is not enrolled in the course, or has completed the course:

Lesson Actions

The Lesson Actions block groups together the actions that can be taken on the lessons page including viewing the quiz, marking the lesson as complete, moving to the next lesson in the course, or resetting the progress of the current lesson. Each of the buttons can be customized by changing its style, color or border.

You can use the dropdown in the toolbar to simulate what the learner will see depending on whether or not they have completed the lesson:

When creating a new lesson, the Lesson Actions block (and Contact Teacher block) are automatically added to the page for you. They are equivalent to the elements that already appear on the lesson page, but because they have been rewritten as blocks, it’s now possible to change how they look, adjust their order, or remove them altogether:

What If I Don’t Want to Use Blocks?

If you’d rather not use blocks for new lessons, you can remove them in the editor and the PHP template will be used to render the lesson as before. This will create a consistent experience for learners until you’re able to update existing lessons to also use blocks.

What Else is in This Release?

Here are some other improvements you’ll find in 3.8:

  • We’ve ensured that all Sensei blocks can be properly translated.
  • We fixed an issue where the lesson order was changing when a lesson was updated.

See the full list of changes.

Developers: For deprecations, please see the beta release post.

To update, please head on over to Dashboard → Updates in the WordPress admin.

Please note: While we have thoroughly tested this release, it’s always possible that we’ve missed something. We recommend that you test the update on a staging site before updating your live site.

Thank you to all our testers and contributors!

Posted on Leave a comment

Sensei LMS 3.8 & WC Paid Courses 2.3.1 Betas – New Course & Lesson Blocks

Sensei LMS 3.8

Sensei LMS 3.8 is ready for testing, and contains two brand new blocks!

Conditional Content Block

The Conditional Content block can be used to conditionally display content on the course page depending on whether the visitor is enrolled or not enrolled in the course, or has already completed it:

Lesson Actions Block

The Lesson Actions block is a grouping of buttons that enables a learner to perform specific actions for a lesson. The style of these buttons are inherited from the theme, but can be customized independently:

See what else is in this release.

Testing Sensei LMS

*Please note that the test site integrates with Smartlook to record your visit. Smartlook is GDPR compliant out of the box, and any recordings will be deleted automatically after 1 month.

If you find a bug, please submit an issue on Github or leave a comment on this post. Our tentative release date is February 9th.

WooCommerce Paid Courses 2.3.1

WooCommerce Paid Courses 2.3.1 fixes an issue where some text was not being translated.

Testing WooCommerce Paid Courses

Beta testers will receive the WooCommerce Paid Courses beta directly to their inbox. If you would like to sign up to be a beta tester and have a valid license, please fill out the beta tester signup form using the same email address you used to purchase your license.

If you find a bug, please leave a comment on this post. Our tentative release date is February 9th.

As these are beta releases, please test them on a staging site and not your live site. If you don’t have a staging site, you can use the WP Staging plugin to create one.

For Developers

If you’re a developer, there’s a single deprecation in Sensei LMS that you need to be aware of:

  • Sensei_Block_Take_Course::get_course_prerequisite_message – Replaced by Sensei_Course::get_course_prerequisite_message
  • Sensei_Setup_Wizard::setup_wizard_set_script_translations (Added on February 9)

Thank you to all our testers and contributors!

Posted on 3 Comments

Sensei LMS 3.7 & WooCommerce Paid Courses 2.3

What’s New in Sensei LMS 3.7?

Sensei LMS 3.7 contains some important bug fixes and performance improvements, and adds an integration with the Site Health tool.

One especially important bug fix involves a pesky issue where some learners were being added to a course or lesson multiple times. This was preventing those learners from making progress in the course. As part of that fix, we’ve also brought back the ability to remove a learner’s progress at the lesson level.

Upon upgrading to 3.7, indexes are automatically added to the comments table if they don’t already exist. As Sensei LMS stores a lot of data in this table, this should noticeably improve the performance of large sites.

We’ve also added an integration with the Site Health tool. The integration does some checks on the status of the learner enrolment job and migration, and will also let you know if your theme is using outdated Sensei template files:

See the full list of changes.

What’s New in WooCommerce Paid Courses 2.3?

When a learner purchases one or more courses, those courses are now listed on the Order Details page. Clicking on any of the courses takes the learner right to that course:

We’ve also added a Courses section to the sidebar of the My Account page, which navigates to the learner’s My Courses page:

Developers: For new hooks, deprecations and template file changes, please see the beta release post.

To update, please head on over to DashboardUpdates in the WordPress admin.

Please note: While we have thoroughly tested this release, it’s always possible that we’ve missed something. We recommend that you test the update on a staging site before updating your live site.

Thank you to all our testers and contributors!

Posted on Leave a comment

Sensei LMS 3.7 & WooCommerce Paid Courses 2.3 Beta Releases

Sensei LMS 3.7

Sensei LMS 3.7 is now available for testing. This release includes some performance improvements, small enhancements, and important bug fixes:

See what else is in this release.

New Filters

  • sensei_add_comment_indexes – Whether to add indexes to the comments table. Default true.
  • sensei_duplicate_post_ignore_meta – Meta keys to ignore when duplicating content.
  • sensei_quiz_answer_file_upload_types – Allowed mime types for file upload questions.
  • sensei_show_enrolment_debug_button – Whether to show the enrolment debug button in Learner Management.
  • sensei_tools – Functionality available from the Tools menu.

New Action

  • sensei_tools_listing_after_{$tool_id} – Display additional information for a specific tool, such as status.

Deprecations

  • Sensei_Admin_Rest_Api_Testharness – Deprecated the entire class.
  • Sensei_Setup_Wizard::get_woocommerce_connect_data – Use Sensei_Utils::get_woocommerce_connect_data.
  • Sensei_Updates::assign_role_caps – Use Sensei_Main::assign_role_caps.
  • Sensei_Updates::add_sensei_caps – Use Sensei_Main::add_sensei_admin_caps.
  • Sensei_Updates::add_editor_caps – Use Sensei_Main::add_editor_caps.
  • Sensei_Updates::sensei_updates_page
  • Sensei_Updates::function_in_whitelist
  • Sensei_Updates::update
  • Sensei_Updates::set_default_quiz_grade_type
  • Sensei_Updates::set_default_question_type
  • Sensei_Updates::update_question_answer_data
  • Sensei_Updates::update_question_grade_points
  • Sensei_Updates::convert_essay_paste_questions
  • Sensei_Updates::set_random_question_order
  • Sensei_Updates::set_default_show_question_count
  • Sensei_Updates::remove_deleted_user_activity
  • Sensei_Updates::add_teacher_role
  • Sensei_Updates::restructure_question_meta
  • Sensei_Updates::update_quiz_settings
  • Sensei_Updates::reset_lesson_order_meta
  • Sensei_Updates::update_question_gap_fill_separators
  • Sensei_Updates::update_quiz_lesson_relationship
  • Sensei_Updates::status_changes_fix_lessons
  • Sensei_Updates::status_changes_convert_lessons
  • Sensei_Updates::status_changes_convert_courses
  • Sensei_Updates::status_changes_repair_course_statuses
  • Sensei_Updates::status_changes_convert_questions
  • Sensei_Updates::update_legacy_sensei_comments_status
  • Sensei_Updates::update_comment_course_lesson_comment_counts
  • Sensei_Updates::remove_legacy_comments
  • Sensei_Updates::index_comment_status_field
  • Sensei_Updates::enhance_teacher_role
  • Sensei_Updates::recalculate_enrolment

Testing Sensei LMS

You can download the Sensei LMS 3.7 beta here. Alternatively, if you don’t have a staging site, you can use our Sensei LMS Test Site. You will be given the same level of access as a teacher, so some functionality may not be available. Please note that the test site integrates with Smartlook to record your visit. Smartlook is GDPR compliant out of the box, and any recordings will be automatically deleted after 1 month.

If you find a bug, please submit an issue on Github or leave a comment on this post. Our tentative release date is January 21st.

WooCommerce Paid Courses 2.3

WooCommerce Paid Courses 2.3 contains a couple of small improvements that we think will make a big difference in helping your learners get started after purchasing a course:

  • Added a link to the My Courses page on the My Account page.
  • Added a Courses section to the order details page so that learners can see which courses they’ve purchased.
  • When a product is sent to the trash, remove that product from all applicable courses.
  • Don’t copy the product over when duplicating a course. This ensures that any learners who purchased the original course don’t gain access to the duplicated course.

New Filter

  • sensei_wc_paid_courses_my_account_menu_courses_position – Change the position of the Courses item in the My Account menu.

Deprecations

  • Sensei_WC::course_link_from_order
  • Sensei_WC::generate_order_notice

Testing WooCommerce Paid Courses

Beta testers will receive the WooCommerce Paid Courses beta directly to their inbox. If you would like to sign up to be a beta tester and have a valid license, please fill out the beta tester signup form using the same email address you used to purchase your license.

If you find a bug, please leave a comment on this post. Our tentative release date is January 21st.

As these are beta releases, please test them on a staging site and not your live site. If you don’t have a staging site, you can use the WP Staging plugin to create one.

Thank you to all our testers and contributors!

Posted on 8 Comments

All-New Course Blocks in Sensei LMS 3.6 and WC Paid Courses 2.2

We are very pleased to announce that Sensei LMS 3.6 is now publicly available. Although technically a minor release, 3.6 packs a major punch!

What’s New in Sensei LMS 3.6?

Sensei LMS 3.6 introduces several new blocks to the course page:

When creating a new course, these blocks are automatically added to the page for you. They are equivalent to the elements that already appear on the course page, but because they have been rewritten as blocks, it’s now possible to change how they look, adjust their order, or remove them altogether:

Take Course

The Take Course block is a button that enables a registered user to enrol in the course. Once enrolled, the Take Course button is no longer displayed for that user. The block can be customized by changing its style, colors or border.

Contact Teacher

The Contact Teacher block enables registered users to contact the teacher. The user is not required to be enrolled in the course in order to send a message to the teacher. Similar to Take Course, the Contact Teacher block can have its style, colors and border customized.

Course Progress

Course Progress displays the user’s progress in the course. This block is only visible to users who are already enrolled. The course progress block enables you to customize the border radius, progress bar height, and colors.

Course Outline

In addition to displaying the modules and lessons that make up a course, the course outline block enables you to build your course structure right inside the editor! Any modules or lessons you add to the block will be created automatically once the course is saved:

Please note that it’s not currently possible to add existing modules or lessons to the course outline block. Given this, the recommended flow for creating a new course is to start with the course outline block, and then add content to the individual modules and lessons once they’ve been created.

You can learn more about how to use these blocks in our documentation. A future release will add more blocks for both lessons and quizzes.

What If I Don’t Want to Use Blocks?

If you’d rather not use blocks for new courses, you can remove them in the editor and the PHP template will be used to render the course as before. This will create a consistent experience for learners until you’re able to update existing courses to also use blocks.

What Else is in This Release?

Here are some other enhancements and fixes you’ll find in 3.6:

  • Ensure analysis export works with RTL languages.
  • Fix incorrect rounding of maximum file size for file upload questions.
  • Ensure learners who have already viewed a quiz see the latest updates the next time they view it.
  • Remove wrapper elements from templates. This should improve the look of Sensei pages on some themes.
  • Enforce minimum PHP version of 7.0.

See the full list of changes.

What’s New in WooCommerce Paid Courses 2.2?

WooCommerce Paid Courses 2.2 extends the Take Course block, and changes it to a Purchase Course button if there is a single product attached to the course, or pricing cards if there are multiple products attached to the course:

Developers: For new hooks, deprecations and template file changes, please see the beta release post.

To update, please head on over to DashboardUpdates in the WordPress admin.

Please note: While we have thoroughly tested this release, it’s always possible that we’ve missed something. We recommend that you test the update on a staging site before updating your live site.

Thank you to all our testers and contributors!

Posted on Leave a comment

Sensei LMS 3.6 & WooCommerce Paid Courses 2.2 Beta 2

Today we’re releasing Sensei LMS 3.6 Beta 2 and WooCommerce Paid Courses 2.2 Beta 2. We are on track to release on December 10th, 2020.

Sensei LMS

Here’s what’s changed in Beta 2:

Course Outline Block

  • Add support for default theme colors to Course Outline block
  • Add support for default theme colors to the module border color setting
  • Make border rules for “Minimal” module style less specific to allow overrides
  • Fix race condition when saving
  • Fix how “Edit Lesson” link displays in WordPress 5.4

Contact Teacher Block

  • Change Contact Teacher button default style

Other

  • Don’t show “Course Video” metabox when any Sensei block is added to the course page
  • Use Sensei logo in block inserter

*Please note that the test site integrates with Smartlook to record your visit. Smartlook is GDPR compliant out of the box, and any recordings will be deleted automatically after 1 month.

WooCommerce Paid Courses

Here’s what’s changed in Beta 2:

Purchase Course Block

  • Warn learner when buying a product containing a course they are already taking
  • Expand the editor and the frontend to support many purchase blocks
  • Ensure variable products work with purchase block

Other

  • Fix typo in package generation to include `lang` folder

You can learn more about these releases here.

Posted on Leave a comment

Sensei LMS 3.6 & WooCommerce Paid Courses 2.2 Beta Releases – Course Blocks

Sensei LMS 3.6

Sensei LMS 3.6 is now available for testing. This release introduces a number of blocks that are available when adding or editing courses:

  • Take Course button
  • Contact Teacher button
  • Course Progress
  • Course Outline

When creating a new course, these blocks are automatically added to the page for you. They are equivalent to the elements that already appear on the course page, but because they have been rewritten as blocks, it’s now possible to change how they look, adjust their order, or remove them altogether.

Course Outline Block

The course outline block is especially noteworthy. In addition to displaying the modules and lessons that make up a course, the course outline block enables you to build your course structure right inside the editor. Any modules or lessons you add to the block will be created automatically once the course is saved:

What Else is in This Release?

Here are some other enhancements and fixes you’ll find in 3.6:

  • Ensure analysis export works with RTL languages.
  • Fix incorrect rounding of maximum file size for file upload questions.
  • Ensure learners who have already viewed a quiz see the latest updates the next time they view it.
  • Remove wrapper elements from templates. This should improve the look of Sensei pages on some themes.
  • Enforce minimum PHP version of 7.0.

See the full list of changes.

Testing Sensei LMS

You can download the Sensei LMS 3.6 beta here. Alternatively, if you don’t have a staging site, you can use our Sensei LMS Test Site. Please note that the test site integrates with Smartlook to record your visit. Smartlook is GDPR compliant out of the box, and any recordings will be deleted automatically after 1 month.

WooCommerce Paid Courses 2.2

WooCommerce Paid Courses 2.2 integrates with the Take Course block, changing it to a Purchase Course button if there is a single product attached to the course, or pricing cards if there are multiple products attached to the course:

Testing WooCommerce Paid Courses

Beta testers will receive the WooCommerce Paid Courses beta directly to their inbox. If you would like to sign up to be a beta tester and have a valid license for WooCommerce Paid Courses that has not expired, please fill out the beta tester signup form using the same email address you used to purchase your license.

If you find a bug in Sensei LMS or Sensei with WooCommerce Paid Courses, please submit an issue on Github or leave a comment here. Our tentative release date is December 10th.

For Developers

If you’re a developer, here are the technical details of what’s changed in Sensei LMS 3.6.

Sensei LMS 3.6

Template File Changes

  • templates/course-results.php – Changed article element to div and removed section.
  • templates/course-results/lessons.php – Changed article element to div.
  • templates/single-course.php – Removed article and section elements.
  • templates/single-lesson.php – Removed article and section elements.
  • templates/single-message.php – Removed article and section elements.
  • templates/single-quiz.php – Removed article and section elements.

New Filters

  • sensei_block_type_args – For WordPress < 5.5, filters block arguments. For WordPress >= 5.5, use register_block_type_args instead.
  • sensei_course_complete_prerequisite_message – Filter course prerequisite message.
  • sensei_use_sensei_template: Whether to use Sensei’s templates and content wrappers.
  • sensei_use_wp_register_link – Force Sensei to output the default WordPress user registration link.

New Action

sensei_loaded: Fires once all global objects have been set in Sensei LMS.

Deprecated Functions & Methods

  • Sensei_Admin::get_lesson_order
  • Sensei_Lesson::on_lesson_published
  • Sensei_Core_Modules::reset_none_modules_transient

There are no deprecations or new hooks in WooCommerce Paid Courses 2.2.

As these are beta releases, please test them on a staging site and not your live site. If you don’t have a staging site, you can use the WP Staging plugin to create one.

Thank you to all our testers and contributors!