Update :
I modified core code "course/renderer.php" for done this.
I modified core code "course/renderer.php" for done this.
public function course_section_cm_list_item($course, &$completioninfo, cm_info $mod, $sectionreturn, $displayoptions = array()) { + global $PAGE; + try{ + $courserenderer = $PAGE->get_renderer('format_'.$course->format, 'course'); + }catch (Exception $e){ + $courserenderer = $this; + } $output = ''; - if ($modulehtml = $this->course_section_cm($course, $completioninfo, $mod, $sectionreturn, $displayoptions)) { + if ($modulehtml = $courserenderer->course_section_cm($course, $completioninfo, $mod, $sectionreturn, $displayoptions)) { $modclasses = 'activity ' . $mod->modname . ' modtype_' . $mod->modname . ' ' . $mod->extraclasses; $output .= html_writer::tag('li', $modulehtml, array('class' => $modclasses, 'id' => 'module-' . $mod->id)); } //rest codes... }