Skip to content

Commit a976175

Browse files
stellargelaaczerzuh
authored andcommitted
infotext bug fix
1 parent 65179b1 commit a976175

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,14 +1292,18 @@ function questionnaire_get_coursemodule_info($coursemodule) {
12921292
global $DB;
12931293

12941294
$dbparams = array('id'=>$coursemodule->instance);
1295-
$fields = 'id, course, name, opendate, closedate';
1296-
if (! $questionnaire = $DB->get_record('questionnaire', $dbparams, $fields)) {
1295+
if (! $questionnaire = $DB->get_record('questionnaire', $dbparams)) {
12971296
return false;
12981297
}
12991298

13001299
$result = new cached_cm_info();
13011300
$result->name = $questionnaire->name;
13021301

1302+
if ($coursemodule->showdescription) {
1303+
// Convert intro to html. Do not filter cached version, filters run at display time.
1304+
$result->content = format_module_intro('questionnaire', $questionnaire, $coursemodule->id, false);
1305+
}
1306+
13031307
// Populate some other values that can be used in calendar or on dashboard.
13041308
if ($questionnaire->opendate) {
13051309
$result->customdata['opendate'] = $questionnaire->opendate;

0 commit comments

Comments
 (0)