Badge Awarder

Blocks ::: block_badgeawarder
Maintained by Karen Holland
This block allows teachers to quickly and simply award badges in a given course by processing a CSV file upload.
Latest release:
86 sites
14 fans
Current versions available: 5

This block has been created to enable quick and simple awarding of pre-existing badges in a given course by processing a CSV file upload. Both existing students and non-students can be awarded badges using this block. In the case of non-students, their details are used to generate new student accounts, they are then enrolled on the relevant course and are emailed their Moodle login details.


Install the block in the /blocks/ folder
Ensure the plugin folder is called "badgeawarder"
Navigate to Site Administration -> Notifications to start installation

Login as an Administrator or Teacher or an account with course editing privilege.

Navigate to the course you wish to award the badges for.

Turn editing on and add the Badge Awarder block within the new course.

You will then see the Badge Awarder block with its link, "Upload Badges CSV". Once clicked, this will bring you to the Badge CSV upload page.

The Badge CSV upload page uses the File Picker for you to select the relevant CSV file to upload, and also allows you to select the delimiter, encoding and number of rows to show on the Preview screen.

Click on the Preview button to submit the CSV file and view the pending user details, then click on the "Award badges" button and the CSV file will be fully processed.

CSV File format

The CSV file must include these field values in the CSV file's first line, and will be processed based on these specified columns. The badge information required is the course badge name, viewable under Course badges.


In order to award a badge by using the Badge Awarder block, the badge itself must have been set up already and enabled, and particularly, set with the single criteria of "Manual issue by role". If the badge itself is set to either of the other two options, Course completion or Activity completion, it will not be successfully awarded by the Badge Awarder block.

In order to enrol either existing students or non-students as part of their badge awarding, the relevant course itself must be enabled for manual enrolments.

The Badge Awarder block also expects to work with a sitewide unique user emails policy, which the CSV upload file must also follow.
Enrolment of non-students may be inadvisable for Moodle sites which serve as MNet service providers, due to user account identification and authentication limitations.


Screenshot #0
Screenshot #1
Screenshot #2


Karen Holland (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • David Mudrák
    Tue, May 20, 2014, 6:07 AM
    Hi Karen. Many thanks for sharing this plugin with the Moodle community.

    I see you have already fixed the badgeawarder/README.txt.txt file in your
    Github repository (as reported by the validator), thanks for that. You may
    consider uploading the updated ZIP with the fix. Please do no hesitate to
    rename it back to We are going to allow .md as a valid extension
    for README files here soon.

    You may also consider fixing the @package doc tag so it holds the
    "block_badgeawarder" value in all files.

    The sample badges included with the block - are they your own ones? Or were
    they obtained from some other source? If they were obtained from elsewhere,
    then we need some information about their origin and their license for
    checking the compatibility with GPL'ed code (probably in a separate file
    within the samples folder). Note that GPL is pretty strict when it comes to
    including other's work and distributing it in one package.

    Let me recommend to develop your block with full DEBUG_DEVELOPER mode on and
    debug messages displayed. The .= operator at the line 68 of
    block_badgeawarder.php throws PHP notice (I know, trivial, but we are aiming
    for none notices thrown ideally).

    The documentation for your block should also mention that it is usable only in
    courses with manual enrolment method available. Also, technically, on sites
    that serve as MNet service providers, the user's email itself is not enough
    for user accounts identification (as it is unique withing the given mnethostid
    only). You may wish to mention that the block expects unique user emails

    The idea of auto-creating and enrolling users into the course is interesting.
    If it was me, I would personally prefer "do one thing and do it well"
    principle. But I respect that as your design decision that is out of scope
    this initial review.

    Otherwise all looks good to me. Thanks for payin attention to following the
    Moodle coding style. The only blocker for now is that uncertain situation with
    the badges samples. Once that is clarified and other issues mentioned above
    are fixed and new version is uploaded, I'll be happy to approve this plugin.
    For now, I am going to mark this plugin as needing more work. Thanks for your
    patience with the review and approval process.
  • Karen Holland
    Wed, May 28, 2014, 1:22 AM
    Hi David

    I really appreciate your initial review of the badgeawarder plugin and my sincerest apologies for there being a few issues with it!

    The idea of auto-creating users in addition to enrolling them into the course as well as awarding badges was part of a client requirement, but I've changed this by having the default mode set to "Award to existing users only".

    I've updated the @package doc tag to "block_badgeawarder" value in all files as suggested.

    I've removed the mistakenly included samplebadges folders as they were not intended to be in the plugin release code, they were for internal testing only and I'm not sure of their source.

    I've also updated the readme documentation with the suggested issues.

    Thanks again for your time and help with this plugin submission.
  • David Mudrák
    Wed, May 28, 2014, 6:01 PM
    Hi Karen. Thanks for fixing all the raised issues. I re-checked the block functionality and the code and I am happy to say you are cleared to land now. Runway free, welcome to the Plugins directory!
  • Janne Mattikas
    Fri, Feb 13, 2015, 9:16 PM

    We tried Badge Awarder block and it works, but we would like to add Badge Awarder block to Moodle 2.6 main page aswell. Is it possible to do that?
    Would appreciate any help smile

  • Ricardo Caiado
    Thu, Apr 7, 2016, 5:43 PM
    Does it work in Moodle 3.x?
  • Ricardo Caiado
    Sat, Mar 17, 2018, 11:36 PM

    Any update to Moodle 3.4?

  • Katherine Chiu
    Fri, Jul 13, 2018, 6:00 PM
    HI Karen,

    I am using Moodle 2.6.
    May I know whether the Badge Awarder block can work if the badge name is in Chinese?
    I have tried but not success.

  • Karen Holland
    Fri, Aug 3, 2018, 11:15 PM
    Hi Katherine, thanks for your query. I've tested on my own site, using both Значок 1 and 徽章1 as examples of UTF-8 badge names, and both worked perfectly to issue the badges to users.

    Hence, your issue is probably somewhere in your badge configurations instead. Have you checked that :
    The course (where the badge is) is enabled for manual enrolments
    Badge status is enabled as "Available to users"
    Criteria is "Awarded by ANY of: Manager, Non-editing teacher, Teacher, Lecturer"
    The CSV file format is like the example I've explained in the documentation?
  • Juli MacArthur
    Thu, Sep 19, 2019, 10:36 PM
    Hi Karen,

    I'm using 3.6 and it appears that the 3 mode options don't appear when I upload a .csv so it defaults to Create New Users, but I definitely don't want to do this!

    Do we know if this is a base version issue or if anyone else has experienced this?


  • Karen Holland
    Wed, Oct 30, 2019, 2:40 AM
    Hi Juli, many thanks for your query about the Badgeawarder plugin!

    There are two ways to set the 3 import mode options of "Award to new users only", "Award to all users, create non-existing users", "Award to existing users only".

    The first way to set the default mode in the plugin global settings, at /admin/settings.php?section=blocksettingbadgeawarder.

    The second way, which would be useful for you, is to initially set "Show Extended Options" to Yes in the plugin global settings. This is disabled by default. Once that is enabled, you may then set the import mode from the dropdown each time that you upload your CSV file of badges to award!
  • Neman Syed
    Mon, Apr 17, 2023, 11:51 PM
    Hi! I'm looking forward to using this! I saw on GitHub Moodle 4.1 support is underway. Are there timelines that can be shared? We're at the start of our digital badging project and it would be great to have this capability!

    Question: Is this limited to Course Badges? Or does it work for Site Badges? Course Badges are explicitly mentioned in the documentation but Site Badges are not mentioned at all. We are primarily focused on Site Badges.

  • Thành Phạm Minh
    Sun, Aug 13, 2023, 5:27 PM
    Hi Karen,
    Many thanks for your plugin.
    Could you build this plugin for Moodle v4.x?
Please login to post comments