Is there way to add a userselector to the settings page of an activity module in moodle?

Is there way to add a userselector to the settings page of an activity module in moodle?

isalpikachu k གིས-
Number of replies: 2

Basically the subject. I would like this user selector in the settings page of my activity module.



དཔྱ་སྙོམས་ཀྱི་སྐུགས་ཚུ།: -
In reply to isalpikachu k

Re: Is there way to add a userselector to the settings page of an activity module in moodle?

Mark Sharp གིས-
Core developers གི་པར Particularly helpful Moodlers གི་པར Plugin developers གི་པར
Yes you can. Here's an example from a plugin I worked on. https://github.com/ltu-solent/moodle-report_adhocreportviewer/blob/main/assign.php
The tricky bits are the queries to select or not select potential users.
In reply to isalpikachu k

Re: Is there way to add a userselector to the settings page of an activity module in moodle?

Andreas Grabs གིས-
Core developers གི་པར Particularly helpful Moodlers གི་པར Peer reviewers གི་པར Plugin developers གི་པར Translators གི་པར
Hi, please have a look to the tool_userdebug:
https://moodle.org/plugins/tool_userdebug