Use shortcodes
You must install and enable the Shortcodes plugin to use shortcodes with Level Up XP.
Introduction
Shortcodes are tags enclosed in square brackets, such as [xpbadge]. You can add shortcodes in Moodle text editors. When Moodle displays the text, it replaces each shortcode with its result.
Example
You can combine any of the available shortcodes with text and layout elements. The following image shows one example on a course page.

The course page in the previous image uses the following editor content. When Moodle displays the content, it replaces the shortcodes with information for the current user.

Available shortcodes
The following shortcodes are built into Level Up XP:
xpbadgedisplays the level badge.xpdropawards points from Moodle content.xpifleveldisplays or hides content according to the current user's level.xpladderdisplays the leaderboard.xpteamladderdisplays the team leaderboard.xplevelnamedisplays the level name.xppointsdisplays points in the experience points format.xpprogressbardisplays the progress bar.
xpbadge
[xpbadge] displays the badge for the current user's level.
xpdrop
This feature requires Level Up XP+.
You can use [xpdrop] to award points from most Moodle content. Do not write this shortcode manually. For instructions, see Use drops.
xpiflevel
[xpiflevel] displays its content when the current user's level matches its conditions. If the user's level matches an exact level, the shortcode ignores the comparison conditions. If no exact level matches, the user's level must match all comparison conditions. Teachers and other users who can edit the content always see it.
[xpiflevel 1 3 5]
This content appears when the user's level is exactly 1, 3, or 5.
[/xpiflevel]
[xpiflevel >3]
This content appears when the user's level is greater than 3.
[/xpiflevel]
[xpiflevel >=3]
This content appears when the user's level is greater than or equal to 3.
[/xpiflevel]
[xpiflevel >=10 <20 30]
This content appears when the user's level is 10 or more and less than 20.
It also appears when the user's level is exactly 30.
[/xpiflevel]
[xpiflevel <=10 >=20]
This content does not appear. A level cannot be 10 or less and 20 or more at the same time.
[/xpiflevel]
[xpiflevel] cannot contain another [xpiflevel] shortcode. You can put other shortcodes, such as [xpdrop], inside [xpiflevel].
xpladder
You can get the embed code from the leaderboard page. For instructions, see Embed the leaderboard. In XP 19 and later, the embed code includes the ctx and secret parameters.
By default, [xpladder] displays the part of the leaderboard around the current user.
[xpladder]
To display the top 10 users, add the top parameter. To select the number of users, give top a value, such as top=15.
[xpladder top]
[xpladder top=15]
By default, the shortcode displays a link to the full leaderboard below the table. To hide this link, add the hidelink parameter.
[xpladder hidelink]
By default, the table does not include the progress bar column. If you enable this column in the leaderboard settings, add the withprogress parameter to include it.
[xpladder withprogress]
If a course uses groups, Level Up XP selects which group to use for the leaderboard.
xpteamladder
This feature requires Level Up XP+.
You can get the embed code from the team leaderboard page. For instructions, see Embed the team leaderboard. In XP 19 and later, the embed code includes the ctx and secret parameters.
By default, [xpteamladder] displays the teams near the current user's team.
[xpteamladder]
To display the top 5 teams, add the top parameter. To select the number of teams, give top a value, such as top=15.
[xpteamladder top]
[xpteamladder top=15]
If more results are available, the shortcode displays a link to the full team leaderboard below the table. To hide this link, add the hidelink parameter.
[xpteamladder hidelink]
By default, the table does not include the progress bar column. If you enable this column in the team leaderboard settings, add the withprogress parameter to include it.
[xpteamladder withprogress]
If the current user belongs to multiple teams, Level Up XP uses the team with the highest rank as the reference.
xplevelname
By default, [xplevelname] displays the name of the current user's level. To display the name of a specified level, add the level parameter.
[xplevelname]
[xplevelname level=5]
If the specified level does not exist, the shortcode displays no content.
xppoints
[xppoints] displays and highlights a number in the experience points format.
[xppoints 1000]
[xppoints]
[xppoints plain]
If you do not specify a number, the shortcode displays the current user's points. Add the plain keyword to display the number without formatting.
xpprogressbar
[xpprogressbar] displays the current user's progress towards the next level.