/** * Recupera a pagina de conteudo de acordo com os parametros pagenum e contentid. * @param int $pagenum * @param stdClass $content * @return array $pagecontent */ function content_ajax_getpage($pagenum, $content, $context) { require_once dirname(__FILE__) . '/locallib.php'; $objpage = content_get_fullpagecontent($pagenum, $content, $context); return $objpage; }
$edit = 0; } // read pages $pages = content_preload_pages($content); if ($allowedit and !$pages) { redirect('edit.php?cmid=' . $cm->id); // No pages - add new one. } // Print the page header. $PAGE->set_url('/mod/content/view.php', array('id' => $cm->id)); $PAGE->set_title(format_string($content->name)); $PAGE->set_heading(format_string($course->fullname)); $PAGE->requires->js(new moodle_url($CFG->wwwroot . '/mod/content/module.js')); // Recupera primeira pagina a ser apresentada $startpage = $pageid ? content_get_pagenum_by_pageid($pageid) : content_get_startpagenum($content, $context); $showpage = content_get_fullpagecontent($startpage, $content, $context); content_add_fake_block($pages, $startpage, $content, $cm, $edit); //ADICIONA BLOCO SUMARIO // ===================================================== // Content display HTML code // ===================================================== // Output starts here. echo $OUTPUT->header(); // Replace the following lines with you own code. echo $OUTPUT->heading($content->name); // Conditions to show the intro can change to look for own settings or whatever. if ($content->intro) { echo $OUTPUT->box(format_module_intro('content', $content, $cm->id), 'generalbox mod_introbox', 'contentintro'); } // Caixa de conteudo echo $OUTPUT->box_start('content-page', 'pages');