LearnDash Users Results Add-On

Introduction

For a LearnDash LMS based website I manage, the admin needed to manually copy paste all notes from her classrooms in another software used by the high-school, and which doesn’t have import CSV/SpreadSheets/File functionality.

It was not very handy because when you display LearnDash Quiz Results, you have to do open a page manually for each users, and the results are not filtered: you have all attempts to all quiz.

It looks good, but you can’t filter the results, and copy pasting is not very easy at it requires to select with click and drag a lot of times. This table is nice and well adapted to a particular user progression in details, but a more efficient solution can be found to fit our particular needs.

The main issue was that the admin needed to have reports for all users of a classroom/groups. Reports per groups of users. So it required to first filter the student list by groups and then open a page for each one of them, and do the selection + copy pasting, taking care of the date, of the attempt index for the quiz etc. What a pain.

I came up with the idea of displaying students results per group on a single page, with results filtered to only display the attempt of a quiz (which is, in the vast majority of cases, the best score). And to make the copy pasting more easier, a simple click on a cell would copy the result. Also, I added filters to be able to only display the desired time range. This was a huge time saver, and more user-friendly.

To push the thing even further, I decided to add just a touch of DataVisualization, by including interactive bar charts below the tables.

I realized it could be useful to others, so I took two days to make it sharp and clean: it is now ready to be a premium add-on for LearnDash!

Let’s discover the features and the look of the plugin.

Update: few months later, I still update and maintain this plugin!

Features

  • Interactive Tables per Users with
    • Search filter
    • Sort by Quiz Name, Quiz Date, Last User Date, Score
    • Date filter (min and max)
  • Interactive Results Charts per User
  • (New) Interactive Tables per Quiz Statistics Entry with
    • Search filter
    • Sort by User Name, Last User Date, Score
  • (New) Interactive Results Charts per Quiz Statistics Entry
  • Possibility to output several users table and charts at the same times with groups shortcode
  • CSV Export
  • Global copy button, or simply click on a cell to copy a value
  • Display only most recent quiz attempt for each quiz
  • Customizable chart with filter
  • Update from Dashboard
  • Charts and tables customizable with CSS. For the chart, see Highcharts doc.

Compatibility

Usage

ShortCodes

Display a single user quiz results table

[ld_group_quiz_table]

Different features for the users tables shortcode (Fixed header, fixed users column, charts filtering etc…).

Display a group of users quiz results table

[ld_group_quiz_results]

Different features for the group table shortcode (Fixed header, fixed users column, charts filtering etc…).

Display results for LearnDash groups leaders

Two special shortcodes which display tables/charts only for users in the LearnDash group for which the current user is the leader.

  • [ld_group_quiz_results_leader]
  • [ld_group_quiz_table_leader]

Display all results for LearnDash groups

A useful shortcode for admins, wich let you choose what you want to display, on one single page.

ld_group_quiz_results_all

Very useful if you have a lots of groups!

Users Results Shortcode Attributes

These attributes are common to the [ld_group_quiz_table] and [ld_group_quiz_results] shortcodes. It is the same for ld_group_quiz_results_all but without the id support, as it is determined by the user with the drop-down menu.

Attribute Type Default Requirement Action Other Values
id integer or csv if type is set to users. 1 Required Choose a group ID
type string "learndash" Optional Choose what kind of groups you want to display "groups" for itthinx Groups,
"buddypress" for BuddyPress,
"all" for all,
"users" for csv of ids,
"current" for current user only.

Display a quiz results statistics and its histogram chart

Are your quiz too difficult? Is there some users which are way above or below the average? What about the median and the overall distribution? Do you want to have a sorted table of your users results? The table and the histogram rendered by this shortcode will help you to answer this question.

The user score is the highest score he got, which is usually his last passage.

[ld_quiz_stats id="0"]

The id is the post id for which you want to display the results  statistics table and histogram.

Display is similar to the shortcode presented below.

Display a post quiz children results statistics and their histogram chart

Like the above shortcode but with front end control to allow you to choose any courses, lessons and topics and get their quiz children.  A course has to be set to avoid huge request on the server.

[ld_quiz_stats_all]

Histogram view in action! (Notes, column headers text is wrong in this screenshot, but this has been corrected).

Hooks

Filters

The following code snippet are the filters declaration, not usage examples. You can see examples usage on this Gist page.

learndash_users_results_datatable_data
apply_filter( 'learndash_users_results_datatable_data', $data_attr, $user_id );

This can allow you to add more parameter as data attribute for the tables, especially for rendering the graph.

learndash_users_results_user_display
apply_filters( 'learndash_users_results_user_display', $user_info );

This filter allows you to change user names display. Useful to replace it by Last Name + First Name, or by randomly generated strings.

learndash-users-results-users
apply_filters( 'learndash-users-results-users', $users, $tags );

This filter allows you to modify users list.

learndash_users_results_quizzes
apply_filters( 'learndash_users_results_quizzes', $quizzes, $user_id );

This filter allows you to modify users what quiz should be rendered.

Notes

  • Coded with WordPress conventions and standards in mind.
  • Clean deactivation and uninstall process.
  • Minimal default styles for better integration in your theme.
  • Default sorting arrows for table required Font-Awesome, but you can replace them with custom CSS.
  • Performance is highly dependent on your amount of data. The more quiz and users you have, the more it can take to load.
  • Showcased on the official LearnDash Community Addons page: More LearnDash Add-Ons | LearnDash

Development Status

No new features planned at this time. The plugin already satisfy more than what I initially needed. The only known issue is that I don’t have find a way to make datatables buttons (copy and successful copy) translatable in a WordPress-friendly way at this time.

Some customization ability (hooks, shortcodes attributes, plugin compatibility) can be suggested by users. Advanced customization/update may require custom development contract.

Changelog

v1.4.2 (2018-04-05)

  • Bug fixes

v1.4.1 (2018-04-04)

  • ld_quiz_stats column header fixed

v1.4 (2018-04-03)

  • New shortcodes: ld_quiz_stats and ld_quiz_stats_all
  • Update Highcharts to v6

v1.3 (2017-10-04)

  • New shortcode: ld_group_quiz_results_all
  • Prevent shortcode interference
  • Fix reset date filter
  • Update EDD updater

v1.2 (2017-08-03)

  • BuddyPress groups support.

v1.1.1 (2017-07-07)

  • Add ld_group_quiz_results_leader and ld_group_quiz_table_leader shortcodes.

v1.1 (2017-06-09)

  • Update bug fix
  • New ld_group_quiz_table shortcode with table and graph
  • Style charts by CSS
  • Warning (backward compatible issue): ld_user_quiz_results shortcode is replaced by [[ld_group_quiz_results type=”current”]]
  • New “id” types for shortcodes (you can put id of users as CSV)
  • Charts lazy loading (now appears only if their source table is on screen)
  • Charts columns colored according to “quiz-passed” status
  • Prevent image loading by DataTables, now required Font-Awesome or custom CSS for sorting arrows display
  • New filters for quiz and users
  • Performance optimizations

v1.0.4 (2017-05-12)

  • New filter to change user name display. See doc on the product page.

v1.0.3 (2017-05-05)

  • Don’t load assets from CDN (all scripts and styles are now included).
  • Small refactoring and optimizations

v1.0.2 (2017-04-28)

  • Bug Fix
  • All groups type attribute

v1.0.1 (2017-04-28)

  • New translation strings

v1.0 (2017-01-31)

  • Initial release

Licenses

License are valid 365 days, from purchase date.

  • 1 site, for individuals or students

  • 3 sites, for business company

  • 5 sites, for business company

Add to Cart