// Processing step. require_sesskey(); $selectedact = required_param('importid', PARAM_INT); $selectedsubwiki = required_param('subwikiid', PARAM_INT); $selectedouwiki = ''; ouwiki_get_wikiinfo($selectedact, $selectedsubwiki, $selectedouwiki, $importedfromcourse); $pagelist = explode(',', required_param('pages', PARAM_SEQUENCE)); // Page ids to import. $conflictmerge = optional_param('conflictmerge', 0, PARAM_INT); // Page conflict setting. $startpagemerge = optional_param('startpagemerge', 0, PARAM_INT); // SP conflict setting. $linkfrom = optional_param('linkfrom', null, PARAM_INT); // Add links to (if SP not included). // Build up index of orig wiki, get selected pages - making sure sub pages are included. $index = ouwiki_get_subwiki_allpages_index($selectedsubwiki); $conflicts = array(); // All conflicting pages in $pagelist [id] => title. $warned = false; // Set to true if user warned of problems. $startpagelocked = false; // Start page locked. $pagelocked = false; // Page you are trying to import into is locked. $startpageid = null; echo $OUTPUT->heading(get_string('import_process', 'ouwiki'), 3); try { // Throw moodle_exception when any problems to display continue/cancel form. $checkpagelist = array(); if ($linkfrom > 0) { // Selected page to link to, so needs conflict checking.
public function load_data() { global $DB, $COURSE; // Load base data. $this->load_base_data($this->subwikiid); // Load all page-versions. $this->pageversions = ouwiki_get_subwiki_allpages_index($this->subwiki); ouwiki_build_tree($this->pageversions); // Get all files used in subwiki. $this->add_files($this->pageversions); }