Adding a cohort designation to a completion certificate?

This is a similar question to my last one, but it’s not quite as simple. I’d like to explore creating self-selected cohorts as is discussed here. But if people select a cohort which has less content, I’d want their completion certificate to show that they selected the less-content option (so people don’t think they did the full class.)

Is there a way to mix a self-selected cohort designation into a completion certificate? I.e. does anyone know if there’s an existing variable that should be used for the cohort?

Hi @JS777,
Try get_cohort.

Thank you, I’ll give that a try!

More generally, is there somewhere I can look up all available variables and what they correspond to, so I don’t need to ask questions in the future to find each one?

Actually, the best place is to browse the code. Fotunately, HTML certificates are still served by Django with Mako templates and are rendered on server’s side. This way, you can run any python code inside the template. You can import any function and access any data model. Just be careful not break anything or to expose any security issue.