Custom fields for activity modules
Certified Partner Plugin
Maintained by
Daniel Neis Araujo
This plugin adds Custom Fields to all activity modules.
Comments
Comments are no longer open for new posts. Existing comments remain available to read.
The fields are not displayed anywhere.
You should modify the code for the plugins where you need them to be displayed.
It seems that the setting "visible to" has no effect. I can set the field-value "everybody", but it never shows up when looking at the activity. Is there something I'm missing?
I use Moodle 4.1 with the boost template.
Regards, Marcel
I successfully installed this plugin.
How can i display custom field in api mod_quiz_get_quizzes_by_courses or core_course_get_contents
Please, let me know if you find any issues.
Unfortunately there is no such feature in this plugin.
Pull requests are welcome
In my case I need tho show a custom field selector only on page resource.
Thank you.
Os campos ficam na mdl_customfield_field e os dados ficam em mdl_customfield_data
function local_modcustomfields_get_field_value($cmid, $fieldname, $default = null) {
$handler = local_modcustomfields\customfield\mod_handler::create();
$datas = $handler->get_instance_data($cmid);
foreach ($datas as $data) {
if (empty($data->get_value())) {
continue;
}
if ($data->get_field()->get('shortname') === $fieldname) {
return $data->get_value();
}
}
return $default;
}
could this plug in add new userfield to statistics?, User fields such as Nationality, Gender and Age.
Thanks a lot,
WWB