trema-tech / moodle-theme_trema

Theme trema, a Moodle LMS plugin.
https://moodle.org/plugins/theme_trema
GNU General Public License v3.0
40 stars 20 forks source link

Add custom field to card courses #99

Open arno974 opened 2 years ago

arno974 commented 2 years ago

Would it be relevant to add the custom fields added by the admin to the card courses ? If so, it could be done by added just after the line 179 of the course_renderer.php file the following code :

if ($course->has_custom_fields()) {
            $handler = \core_course\customfield\course_handler::create();
            $customfields = $handler->display_custom_fields_data($course->get_custom_fields());
            $content .= \html_writer::tag('span', $customfields);
}
rmady commented 2 years ago

Hello @arno974,

I love the ideia of adding the custom fields for the courselist but I know that some Moodles have a loto of custom fields in use, so I think it's better to put it in an modal or something like this. I'll do this and put this option in the Trema settings. Thank you for the contrib lol

Kind regards, Rodrigo Mady

michael-milette commented 2 years ago

Perhaps it could have 3 options:

  1. Do not show
  2. Show in card
  3. Show in popup