Set a student variable and use it in a Moodle module

Set a student variable and use it in a Moodle module

by Filip Rysavy -
Number of replies: 2

Hi,

Is it possible to set a custom user/student variable and use the variable in the module text?

Example:

Set a user-slug variable either manually or e.g. from user email + random number:

john.doe@example.com => Creates a user-slug: john-doe-example-com-357

And when I create course modules, is it possible to render the variable, unique for each student?

For example in "Text and media area":

Check your personal link here:

https://www.some-web.com/dir/personal-link-for-{{ user-slug }}

Thanks for help, hints and suggestions!

Average of ratings: -
In reply to Filip Rysavy

Re: Set a student variable and use it in a Moodle module

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Average of ratings: Useful (2)
In reply to Marcus Green

Re: Set a student variable and use it in a Moodle module

by Filip Rysavy -
I think I can make it working with {username} tag.

Thanks, Marcus!
Average of ratings: Useful (1)