Save Learner Name to Variable in Moodle

Hi! Is it possible, to get a User’s Name coming from Moodle?

Hi @Pablo this should be possible. You need to create a variable (done in the Logic section) then go to Course Settings > Learner, toggle on ‘Save Learner Name to Variable?’ and select the variable from the list.

Then you just need to use the variable in a text field and it should display the learner’s name.



Thank you @Sam_Cook_Evolve_QA ! I have tried it and get back “undefined” as the value. What am I doing wrong? Do you have any advice for me?

Is the course published and running on moodle? Are you logged into a user account when testing? It will not be possible to see the name just using Live Preview before the course is published.

We’d really need to see how you set up your variable and your text box to see if there’s anything not right. Could you post some screenshots or DM a link to your course editor for the course for investigation?

Thank you so much for your fantastic support.
I found the solution in this article:
It has to do with “SCORM standards mode settings” in Moodle. The Evolve settings work as described by @Sam_Cook_Evolve_QA


Great to hear - yes there are many settings within Moodle that need to be configured to get it working how you want it seems!

Have fun!