From 8656271a6355bba746d32e506bacecd435184913 Mon Sep 17 00:00:00 2001 From: Ferran Recio Date: Wed, 8 Mar 2023 10:03:40 +0100 Subject: [PATCH] MDL-77552 core_courseformat: add plugin and module to cm state Backport of MDL-77386 --- course/format/classes/output/local/state/cm.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/course/format/classes/output/local/state/cm.php b/course/format/classes/output/local/state/cm.php index b602c0540e1..99b5a493f4f 100644 --- a/course/format/classes/output/local/state/cm.php +++ b/course/format/classes/output/local/state/cm.php @@ -90,6 +90,8 @@ class cm implements renderable { 'sectionnumber' => $section->section, 'uservisible' => $cm->uservisible, 'hascmrestrictions' => $this->get_has_restrictions(), + 'module' => $cm->modname, + 'plugin' => 'mod_' . $cm->modname, ]; // Check the user access type to this cm.