Repository navigation
Code giveaway
Mika Tompuri edited this page Jun 23, 2025
·
4 revisions
This page explains what the code giveaway feature is and how it can be set up.
The feature allows you to add and manage a list of unique codes that can be assigned to students that have passed a certain course module. For example, the feature can be used to allow each student who completes a course module to get their own unique discount code. Each code can be a distinct string of characters.
To set up a code giveaway, you must create a new code giveaway, add codes to the giveaway and make the giveaway visible to students.
- In course admin view, open tab Other, select Code giveaways subtab.
- In the dialog that opens, enter the following information:
- Name: A name for the code giveaway. A good name will be brief but contains a reference to when it has been created and purpose.
- Course module id: The course module the giveaway is connected to. This field is required. Currently, you must ask for MOOC Center staff to give you the id for the course module.
- Require course specific consent form question id: This field can be left blank. If you want your code giveaway to be connected to a certain question in your custom course research consent form, get in touch with the MOOC Center team.

- After you have clicked on the Create button on the dialog, the created the giveaway will be visible in the list of code giveaways. Click on the code giveaway you have created.
- Click on the Import button and in the dialog, enter the unique codes (one per line) and click Create. Your codes have been added and now we must make them visible to students.
- Edit the page where you want the student to be able to access their code. Add a CodeGiveaway block.
- In block settings (on the right-hand side of the screen), select the correct code giveaway to be used. Write instructions in the Instructions field of the block. Save changes to the page.
