Custom Moodle Format to Display Class Title and Summary


How can we display course information such as the title and summary without entering the information by hand? We are able to have this information automatically entered in the class settings, but also want it to appear in the topic view of the course.

Related Articles/Questions


In order to display the title and summary of the course in the course view, a new format.php should be developed. This has the benefit of providing exactly what is needed, however the downside is that it is UCLA specific.

To simplify the process this will be mainly based of the topics format (/course/format/topics/format.php). The lines that are of importance are 96-116.

To solve the summary display issue:

  • replace echo format_text($thissection->summary, FORMAT_HTML, $summaryformatoptions);
  • with something similar to line 29 of /blocks/course_summary/block_course_summary.php format_text($COURSE->summary, FORMAT_HTML, $options);

To solve the Topic Outline header:

  • replace line 81 of /course/format/topics/format.php with something that prints the course name.