dongpao1873 2014-05-15 23:16
浏览 94
已采纳

在课程概述块Moodle中显示课程摘要文本

I would like to display the course summary text underneath the course title within the Course Overview block. How would I go about accessing and displaying this information?

  • 写回答

3条回答 默认 最新

  • dongqie8661 2014-05-16 12:53
    关注

    Doesn't look like there is an option to display the summary.

    The code to display the course name and link is in

    function course_overview() in /blocks/course_overview/renderer.php
    

    If you look for $coursefullname, you should see something like this

    $coursefullname = format_string($course->fullname, true, $course->id);
    $link = html_writer::link($courseurl, $coursefullname, $attributes);
    $html .= $this->output->heading($link, 2, 'title');
    

    So you'll need to add something like this

    $html .= $course->summary;
    

    The $course->summary normally contains a lot of html, if you want to remove that then use this instead

    $html .= format_string($course->summary);
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 DS18B20内部ADC模数转换器
  • ¥15 做个有关计算的小程序
  • ¥15 MPI读取tif文件无法正常给各进程分配路径
  • ¥15 如何用MATLAB实现以下三个公式(有相互嵌套)
  • ¥30 关于#算法#的问题:运用EViews第九版本进行一系列计量经济学的时间数列数据回归分析预测问题 求各位帮我解答一下
  • ¥15 setInterval 页面闪烁,怎么解决
  • ¥15 如何让企业微信机器人实现消息汇总整合
  • ¥50 关于#ui#的问题:做yolov8的ui界面出现的问题
  • ¥15 如何用Python爬取各高校教师公开的教育和工作经历
  • ¥15 TLE9879QXA40 电机驱动