/** * * * * * */ function render_content($course, $modinfo, $page_context) { global $DB; $rendered_course = $DB->get_record('course', array('id' => $course->id)); $rendered_course_id = $rendered_course->id; $sections = $DB->get_records('course_sections', array('course' => $rendered_course_id)); $modules = $DB->get_records('course_modules', array('course' => $rendered_course_id)); //must have for comments comment::init(); render_sections($course, $sections, $modules, $modinfo, $page_context); }
<div class="panel-group" id="accordion"> <?php foreach ($chapters as $chapter_no => $cur_chapter) { echo '<div class="panel">'; echo '<div class="panel-heading">'; echo '<h4 class="panel-title">'; echo '<a data-toggle="collapse" data-toggle="collapse" data-parent="#accordion" href="#collapse' . $chapter_no . '">'; echo $cur_chapter; echo '</a>'; echo '</h4>'; echo '</div>'; echo '<div id="collapse' . $chapter_no . '" class="panel-collapse collapse ' . (isset($chapter) && $chapter == $cur_chapter ? "in" : "") . ' ">'; echo '<div class="panel-body">'; render_sections($dbc, $cur_chapter, $section); echo '</div>'; echo '</div>'; echo '</div>'; } ?> </div> </div> </div> </div> <div class ="col-sm-9"> <?php render_paragraphs($dbc, $db_name, $section); ?>