Assigning badges to pages I covered what a script would look like that could generate a badge awarding environment. Typically you would create a UI to manage this, rather than doing it through scripts. However, here's another approach using a spreadsheet to describe your questions and answers.In
You will notice there are 5 tabs and they are used as follows. Take a look at the tabs and read the description below. The Spreadsheet is here if you want to copy it.
By splitting up the components in this way, questions, collections, questionsets and badges can be recombined in multiple ways depending on the topic the panelset refers to.
The badgeManager will take data from the scriptDB. The data in your sheet needs to be loaded into a scriptDB, but I provide a library to do that accessible in the mcpher library - see Using scriptDB. Once you have constructed the spreadsheet above, all you need is one line of code as below
Typically you would be using the scriptDB of the script that serves up the badge data, rather than the one associated with the sheet that defines the data, for a couple of reasons
Services > Desktop Liberation - the definitive resource for Google Apps Script and Microsoft Office automation > Things that have been deprecated > Badges >