GrassBlade xAPI Companion plugin gives you 4 blocks for Gutenberg editor so you can do things with ease.
These blocks will reduce your hassle of using shortcodes. Let’s check out more about each block and understand how to use them?
xAPI Content Block
With this block, you can add xAPI Content to any WordPress page or post. Also, to align your content you do not need to use [grassblade] shortcode for positioning. Just insert xAPI Content block on the page, where you want to show the content and select the content.
Now, you can show multiple xAPI contents on a single page, insert as many blocks as you want.
The best thing about this block feature is that you can enable completion tracking on each content and it will mark your LearnDash lesson complete automatically, once a user completes all the xAPI content added on that page.
Steps for adding xAPI Content
Step 1: Add xAPI Content block.
Step 2: Select xAPI Content from add to page dropdown.
That’s it, your content is ready to go.
Note: Make sure you have uploaded xAPI Content and published it in xAPI Content > Add New page. Read: How to upload xAPI Content?
Add this block (Admin Reports) on any page or post to show reports on the front end. These reports are accessible to LearnDash group leaders and admin users. If you’re using a block editor then you can use this shortcode [grassblade_reports].
Insert a Leaderboard Block on any WordPress page or post to create a leaderboard for your xAPI content. Now, there is no hassle with the shortcode.
Steps to create a Leaderboard using Gutenberg/Block editor:
Step 1: Add Leaderboard block
Step 2: Select xAPI Content for which you want to show a leaderboard.
Step 3: Select User Roles, who can see it?
Step 4: Now, select Score Type.
Step 5: Enter the size of the Leaderboard.
Classic editor users can create a leaderboard by using the [gb_leaderboard] shortcode.
Following parameters can be used to customize:
id: (optional) Defaults to the same page. It can be xAPI Content ID or Page ID, or Post ID, or LearnDash Course/Lesson/Quiz ID. Shows Leaderboard for the specified page. If Course ID is given, it shows a leaderboard based on the sum of all xAPI Content on the specified course. e.g. [gb_leaderboard id="1234"]
allow: (optional) Defaults to “all”. Role ID or Capabilities can be provided in comma separated form. e.g. [gb_leaderboard id="1234" allow="administrator,edit_posts"]
score: (optional) Defaults to “score”. If you want to show and make calculations based on percentage values. A course that sends only percentage value will use percentage values in both cases.
e.g. Percentage: [gb_leaderboard id="1234" score="percentage"]
limit: (optional) Defaults to “20”. This is the number or records to show in the Leaderboard. e.g. [gb_leaderboard id="1234" limit="10"] to show top 10 users for course with ID 1234.
Using this block, you can show user scores for particular content or the total score in all the contents.
Steps to show user score in the front end:
Step 1: Add User Score block.
Step 2: Use the default label “User Score” or change it as per your need.
Step 3: Select a specific xAPI Content or All Content.
Step 4: Select Score Type.
Step 5: Add BadgeOS point if you want, it is optional.
Your user score is ready. If you’re facing some problems in terms of design you can use the shortcode given below the settings.
Show total score of a xAPI Content of current logged-in user:
[grassblade_user_score content_id=123 show='total_score']
Show avg. percentage of a xAPI Content of current logged-in user:
[grassblade_user_score content_id=123 show='average_percentage']
With this block, you can create a frontend reports page for learners, so they can check the status of the xAPI Content progress. If you’re using the rich quiz reports feature, then learners can check quiz reports as well including the answers given to the questions.
Classic editor users can use this shortcode [gb_user_report] to add this report on any page. To match the background color of the report to your theme color, you can try it like this [gb_user_report bg_color=#83BA39].
These features are part of our renewed efforts to make your life simple. We will keep doing such things to provide more value and seamless UI.
Hope you find these features useful. If you have any comments, suggestions, or feature requests feel free to drop a message in the comment section below or contact us.