Skip to content

Commit

Permalink
rebased (#516)
Browse files Browse the repository at this point in the history
Signed-off-by: rezeau <[email protected]>
  • Loading branch information
rezeau authored Feb 23, 2024
1 parent 46bd6b3 commit 1326e31
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1326e31

Please sign in to comment.