fix: use formatted course module name in activity script

Updated the rendering logic to use the formatted course module name instead of the plain name when generating the activity script. This ensures consistency in presentation and improves readability.

Fixes issues with name formatting in displayed activities.
This commit is contained in:
Kumi 2024-09-23 09:08:09 +02:00
parent a40ffdf41f
commit dba761ac70
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -53,7 +53,7 @@ function mod_exp360_cm_info_dynamic(cm_info $cm)
$renderer = $PAGE->get_renderer('mod_exp360'); $renderer = $PAGE->get_renderer('mod_exp360');
$modals = $renderer->render_modals(); $modals = $renderer->render_modals();
$script = $renderer->render_activity($cm->id, $cm->name); $script = $renderer->render_activity($cm->id, $cm->get_formatted_name());
$cm->set_no_view_link(); $cm->set_no_view_link();
$cm->set_content($modals . $script); $cm->set_content($modals . $script);