diff --git a/lib.php b/lib.php index 46ac3232..dd7f2ea0 100644 --- a/lib.php +++ b/lib.php @@ -262,6 +262,13 @@ function questionnaire_get_coursemodule_info($coursemodule) { $info = new cached_cm_info(); $info->customdata = (object)[]; + + if ($coursemodule->showdescription) { + // Convert intro to html. Do not filter cached version, filters run at display time. + // Based on the function quiz_get_coursemodule_info() in the quiz module. + $info->content = format_module_intro('questionnaire', $questionnaire, $coursemodule->id, false); + } + // Populate the custom completion rules as key => value pairs, but only if the completion mode is 'automatic'. if ($coursemodule->completion == COMPLETION_TRACKING_AUTOMATIC) { $info->customdata->customcompletionrules['completionsubmit'] = $questionnaire->completionsubmit;