Reputation: 7515
The Moodle system has a profile for each user that logs on. In that profile you can fill in fields like your name and email address.
Moodle has various activities that can be used to build courses. One of the activities is called a "Lesson". This is a resource that allows you to provide text that guides the student on what to do.
My question is asking whether it is possible to use these fields, for example "First Name" and "Surname", in the text in those lessons. I want to extract them from the user profile of the logged in user, and use them somewhat like a mail merge, i.e insert the value extracted directly in the text. Is this possible?
i.e.
Hello {{First Name}}. Welcome to lesson 1.
Upvotes: 0
Views: 742
Reputation: 327
The $USER object contains this, and much more data. Thus $USER->firstname would give the required data.
Upvotes: 0
Reputation: 6317
This is a feature of the 3rd-party plugin Generico, but you'll have to read through the documentation in order to understand exactly how to use it.
Upvotes: 1