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 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?