Hi, we are using Badges, but its kinda sad. When the student is awarded a badge there is no notifciation. Cant a Popup come or something?
Hello there. Well -they should get an email as notification but if you are looking for something more dramatic, there is a tracker issue here: MDL-39923
I agree, the badges loses it's attractiveness if the user can't see that he earned it.
Yes i am aware of the Tracker issue now. Watching and Voting lol.
I agree with Yoni, i have placed the badges on the footer (block) so atleast my students can see them! It would be great if a popup was there.
I would really appreciate if you could tell me how you did this. I have spent half a day trying to figure out how to display badges, for a number of reasons. I want the badges to be part the home page or something so that students can see them. Did you use a block for the footer? I am kind of a newbie to Moodle.
There is My latest badges block which you can display on the front page or on the users's My home page (or if you are using Moodle 2.5.1 on a course page) It displays each user's own badges. I don't know of a way to display all available badges other than adding them to an html block. In Seth's picture above he has displayed this same block on the My home page. See My latest badges block and on the My home page you can display blocks in the centre.
Thank you!
Hi guys,
I am really sorry. I was looking at adding some kind of popups to the notification, but haven't got time to finish this yet . I will make sure to get back to this issue at some point. Would also appreciate any contributions that you would like to see in badges Being a sole maintainer of such a rather large feature is pretty difficult...
Yuliya
Yuliya,
I am very happy that someone is maintaining this feature. Thank you. But when you do get some time, please remember that many schools stdents don't have email, so using email as the only notification method is not good. As I think about it, would it be possible for admins or teachers to have a default message that can be created and sent out through ALL message channels in Moodle?
For example, if a student earns a badge, then every communicatoin method Moodle uses (messaging, Email, etc.) would pick us this default message and send it out. I was envisioning something like:
"Hello (variable to hold student name) You have achieved (variable to hold what achievements are possible, like grade percent or letter grade, or maybe even x numbe rof forum posts, or time spent in an activity) I am proud of you, and you are awarded the (variable to describe badge) badge"
Perhaps this message could be contained in a teacher configured field so that the teacher could insert a variable name within custom text?
But the most important thing is of course to just have notification capability beyond email.
Thanks again for helping the community.
Seth,
I LIKE how you implemented putting the badges in the footer. I want to copy this technique.
Can you please explain how you did this?
Doug - I expect Seth can tell us better but it looks to me like the My latest badges block has been added to the My home page and then moved into the centre (which you can do on the My home page) It would be good to know if it appears elsewhere on Seth's site too though.
Hi, You could use any theme which supports Footer, for me, i am using Essential https://moodle.org/plugins/browse.php?list=category&id=3 And then as Mary said, i am using the My Latest Badges Block on the homepage ( while the settings are for Where this Block Appears to be at Any Page,
Ill post a screenshot to help. Just make sure your using a theme with Footer, so it saves up all the programming
And Yes Mary, the badges comes at every page Also the My profile Block
This is all helping me out a lot. For now, having a block will suffice but some sort of live notification that a badge was earned would be great (in addition to the email). Just putting in my vote for something like this. Thanks for your work on this component!
Hope you are doing great, so back to Badges, finally implementing it site wide.. A few questions?
As Mary said, Badges you make as a site admin will appear in the user's profile but not in the course as they are not course badges. Course badges will appear in the course badges link in a course but only in that course.
-
So, i intended to make Badges for each topic completion and when you complete a course, you get a Badge(Belt Image) for course completion. Is there a way or a workaround to make the previous badges earned throughout the course to not be visible at some area.
- The profile page shows all badges earned, regardless of the course.
- I was hoping first to make Course Completion badges on Site Home, so you can see only the course completion badges i.e the Belt on the 'My Latest Badges' block on the My Home Page or at the 'Profile'.
- And the badges block made inside the course, will only show Badges earned inside the course. i.e 'Course Badges'.
But it aint the case, as the My Latest Badges block shows all course badges even on the 'My Home Page', when it should only show 'Site Badges' at this point? Or am i missing something.
Thanks.
Hi Seth,
Just to clarify some points. "My Latest Badges" block being added to My Home page will show to a user all badges earned by this user. When you add this block on the course page, it will show only badges from this particular course.
Yuliya
Hi, yes I am aware of that.. I was looking though for a work around. As there would be well too many badges appearing on the site. We need to distinguish course completion badges different from the topic completion badges (collection of activities)..
I was hoping I will replicate the badge block, to another block which shows only the site wide badges. Would it be possible? I saw the lines where the course content was given, but then it wasn't working as expected.
Some instructions would be great thanks. So I will place the default badge block on the course page, and the little modified badge block for site badges on the my homepage..
Thanks.
Hmmm, no, there is no option to display site badges only. In this case users will not be able to also showcase their course badges in site profile.
Your workaround would be to modify "badges_get_user_badges()" method from badgeslib.php to add a check for something like if $courseid is 1 (SITE) then get only site badges (it creates an SQL snippet which is used later to get the records).
Let me know if you need more information on that.
Yuliya
Hi Yuliya
At line number 820, added
if ($courseid = 1) {
$sql = 'SELECT
bi.uniquehash,
bi.dateissued,
bi.dateexpire,
bi.id as issuedid,
bi.visible,
u.email,
b.*
FROM
{badge} b,
{badge_issued} bi,
{user} u
WHERE b.id = bi.badgeid
AND u.id = bi.userid
AND bi.userid = ?
AND b.courseid = 1
ORDER BY bi.dateissued DESC';
}
But it resulted in
MY BADGES
Hi Seth,
Site badges have a different type value, and they don't store course ID. What you need to do is something like this: https://gist.github.com/ybozhko/9256984
Have a look if it does what you need. Just pass 1 (id of a site) as course id parameter in badges_get_user_badges().
Hope it helps.
Yuliya
Hi Seth,
I don't think you understood the part where you need to pass 1 as courseid parameter when you call the method... I just tried myself and everything works for me. Right now in Badges block file there is a condition:
if ($courseid == SITEID) {
$courseid = null;
}
You either need to set $courseid = 1; or remove the entire if-statement because SITEID already equals 1 by default. With all these modifications Badges block will show only site badges when displayed on Home page and only course badges on Course page. You won't be able to display them together again unless you completely modify the block and add some settings where user can decide what they want to display.
Yuliya
Ah, great! Works great, the 'My Home' & 'Site Home' are showing the 'Site Badges' & inside the course the 'Course Badges' are visible. \o/