- 1 Introduction
- 2 Features
- 3 Compatibility
- 4 Usage
- 4.1 ShortCodes
- 4.1.1 Display a single user quiz results table
- 4.1.2 Display a group of users quiz results table
- 4.1.3 Display results for LearnDash groups leaders
- 4.1.4 Display all results for LearnDash groups
- 4.1.5 Users Results Shortcode Attributes
- 4.1.6 Display a quiz results statistics and its histogram chart
- 4.1.7 Display a post quiz children results statistics and their histogram chart
- 4.1.8 Display group quiz attempts statistics and associated bar chart
- 4.2 Hooks
- 4.1 ShortCodes
- 5 Notes
- 6 Development Status
- 7 Changelog
- 8 Licenses
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.
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!
- 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
- Custom user meta table (for certain shortcodes)
- Filter by LearnDash Group leaders
- 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.
Display a single user quiz results table
Display a group of users quiz results table
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.
Update: From v1.5, you can now just add
type="learndash_leader" as shortcode attribute for any shortcode.
Display all results for LearnDash groups
A useful shortcode for admins, wich let you choose what you want to display, on one single page.
Users Results Shortcode Attributes
These attributes are common to the
[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.
||integer or csv if type is set to users.||
||Required||Choose a group ID|
||Optional||Choose what kind of groups you want to display||
||string, csv||“”||Optional||Choose other user meta column to display for the
||WordPress user_meta names separated by commas.|
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.
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.
Display group quiz attempts statistics and associated bar chart
[ld_group_quiz_attempt] will display a table and chart to compare the number of quiz attempts VS quiz mastered by users.
The following code snippet are the filters declaration, not usage examples. You can see examples usage on this Gist page.
apply_filter( 'learndash_users_results_datatable_data', $data_attr, $user_id );
apply_filters( 'learndash_users_results_user_display', $user_info );
apply_filters( 'learndash-users-results-users', $users, $tags );
apply_filters( 'learndash_users_results_quizzes', $quizzes, $user_id );
- 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
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.
type="learndash_leader"for all shortcodes.
- Few optimizations
learndash_leadershortcode attribute for
- Bug fixes
- -0 score became “Not passed” string.
- Bug fixes
ld_quiz_statscolumn header fixed
- New shortcodes:
- Update Highcharts to v6
- New shortcode:
- Prevent shortcode interference
- Fix reset date filter
- Update EDD updater
- BuddyPress groups support.
- 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
- New filter to change user name display. See doc on the product page.
- Don’t load assets from CDN (all scripts and styles are now included).
- Small refactoring and optimizations
- Bug Fix
- All groups type attribute
- New translation strings
- Initial release