-
Bug
-
Resolution: Fixed
-
Minor
-
3.11.3, 3.11.4, 4.0
-
MOODLE_311_STABLE, MOODLE_400_STABLE
-
MOODLE_311_STABLE
-
In user_badge_exporter, the issuername is defined as PARAM_NOTAGS. However, by default the issuername is set as the site name, and the site name can contain HTML tags (e.g. for multilang). In that case, calling the WebService core_badges_get_user_badges returns an invalid response exception.
How to reproduce:
- As admin, hange the name of your site to include HTML tags. E.g.: <span lang="en" class="multilang">My Site</span><span lang="es" class="multilang">Mi sitio</span>
- Add a new user to the site (Site administration ► Users ► Add a new user).
- Go to Site Administration ► Badges ► Add a new badge.
- Fill the required fields and create the badge.
- Go to the Criteria tab and add the criteria "Manual issue by role".
- Enable the badge so it can be awarded.
- Go to recipients and award the badge to the user you created before.
- Enable "Mobile services": Site administration ► Mobile app ► Mobile settings
- Create a Token in the mobile app service for the user you created before.
- Click on Site administration ► Plugins ► Web services ► Manage tokens
- Open the console an execute this curl request, replacing WSTOKEN with the token you just created and the site url with yours. The USERID value has to be replaced with the id of the user you created before.
curl 'http://SITE_URL/webservice/rest/server.php?moodlewsrestformat=json' --data 'userid=USERID&courseid=0&moodlewssettingfilter=true&moodlewssettingfileurl=true&wsfunction=core_badges_get_user_badges&wstoken=WSTOKEN' --compressed
- Check that you receive an invalid response exception.
- has a non-specific relationship to
-
MDL-72857 Issued badge page doesn't filter site/course names (e.g. multi-lang content)
- Closed
- is a regression caused by
-
MDL-68746 Hide issuer details when creating badges with Open Badges 2.0 and above
- Closed
- will be (partly) resolved by
-
MDL-72354 Show always issuer details when creating/editing badges
- Closed