Moodle standard_end_of_body功能位置


Moodle standard_end_of_body function location?

我正在尝试自定义standard_end_of_body()的渲染,但我似乎找不到合适的功能。

我在/lib/outputrenderers.php中找到了抽象函数,但没有找到实际的主题实现。在代码中提到它应该在主题渲染器中,所以我检查了每个渲染器,以及我基于的主题(引导和优雅),但到目前为止,nada。

所以我非常愿意接受任何建议!

谢谢

In /theme/yourtheme/renderers/php

添加这个

class theme_yourtheme_core_renderer extends core_renderer {
    public function standard_end_of_body_html() {
        // Optionally add the parent html.
        $output = parent::standard_end_of_body_html();
        $output .= 'my stuff';
        return ($output);
    }

或者,您也可以将页脚 HTML 添加到设置additionalhtmlfooter

通过站点管理员 ->外观 -> 其他 HTML

或直接访问/admin/settings.php?section=additionalhtml