Embed the leaderboard
You can use a shortcode to add the leaderboard to Moodle content. Learners can then see the leaderboard without opening the leaderboard page.
Prerequisites
You must install and enable the Shortcodes plugin to use shortcodes with Level Up XP.
Embed the leaderboard
- Go to the leaderboard page.
- In the page menu, select Embed leaderboard.
- Copy the shortcode from the dialog.
- Paste the shortcode into a Moodle text editor. For example, add it to a course section summary, a block, or a page resource.
The shortcode has the following format:
[xpladder ctx=123 secret=abcd1234]
Level Up XP generates the ctx and secret parameters for the correct context. Do not write the shortcode manually.
Options
To change the leaderboard display, add parameters to the shortcode:
topdisplays the top users instead of the users near the current user. You can specify the number of users, such astop=10.hidelinkhides the link to the full leaderboard page.withprogressadds the progress bar column if you enable the column in the leaderboard settings.
For example:
[xpladder ctx=123 secret=abcd1234 top=10 hidelink]
See the shortcodes reference for the full list of options.
Team leaderboard
This feature requires Level Up XP+.
You can also embed the team leaderboard. Go to the team leaderboard page and follow the same procedure. Level Up XP generates an [xpteamladder] shortcode for the team leaderboard.