Hi,
I have already searched many sources but found no answer. I am using Moodle 3.9.2. I am looking for solutions for the following functionalities:
1.Self-enroll method
In the welcome message, the user should receive information about (global for all courses)
a) Name of the course - I know ($a->coursename)
b) Link to your profile - I know ($a->profileurl)
c) Link to the course - I do not know, but I can convert the link to the profile into a link to the course. I tried something like this, but I know that it is uncool (and destroy "b" point):
$a->profileurl = "$CFG->wwwroot/course/view.php?id&course=$course->id"
d) Information from customfield (each course has its own dedicated field named "PREWORK" that we would like to send in such an e-mail - there we put, for example, information about what to do before the training). Customfields to courses have been added via root/course/customfield.php (eg. "prework").
2. Manual enroll
Everything as above, but also a welcome e-mail - now it doesn't send.
Thank you!