X7ROOT File Manager
Current Path:
/home/cbholdings/pasukulu/mod/wiki
home
/
cbholdings
/
pasukulu
/
mod
/
wiki
/
📁
..
📄
README
(138 B)
📄
admin.php
(4.36 KB)
📁
backup
📁
classes
📄
comments.php
(2.59 KB)
📄
comments_form.php
(1.44 KB)
📄
create.php
(4.12 KB)
📄
create_form.php
(3.68 KB)
📁
db
📁
diff
📄
diff.php
(2.97 KB)
📄
edit.php
(4.25 KB)
📄
edit_form.php
(5.22 KB)
📄
editcomments.php
(2.46 KB)
📁
editors
📄
files.php
(3.74 KB)
📄
filesedit.php
(3.84 KB)
📄
filesedit_form.php
(1.67 KB)
📄
history.php
(2.78 KB)
📄
index.php
(3.06 KB)
📄
instancecomments.php
(3.61 KB)
📁
lang
📄
lib.php
(28.84 KB)
📄
locallib.php
(60.88 KB)
📄
lock.php
(2.54 KB)
📄
map.php
(2.75 KB)
📄
mod_form.php
(4.29 KB)
📄
module.js
(4.25 KB)
📄
overridelocks.php
(2.56 KB)
📄
pagelib.php
(98.23 KB)
📁
parser
📁
pix
📄
prettyview.php
(2.37 KB)
📄
renderer.php
(26.17 KB)
📄
restoreversion.php
(2.59 KB)
📄
search.php
(2.95 KB)
📄
styles.css
(5.48 KB)
📁
templates
📁
tests
📄
upgrade.txt
(1012 B)
📄
version.php
(1.44 KB)
📄
view.php
(10.15 KB)
📄
viewversion.php
(2.75 KB)
Editing: create.php
<?php // This file is part of Moodle - http://moodle.org/ // // Moodle is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // Moodle is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see <http://www.gnu.org/licenses/>. require_once('../../config.php'); require_once(__DIR__ . '/create_form.php'); require_once($CFG->dirroot . '/mod/wiki/lib.php'); require_once($CFG->dirroot . '/mod/wiki/locallib.php'); require_once($CFG->dirroot . '/mod/wiki/pagelib.php'); // this page accepts two actions: new and create // 'new' action will display a form contains page title and page format // selections // 'create' action will create a new page in db, and redirect to // page editing page. $action = optional_param('action', 'new', PARAM_TEXT); $wid = optional_param('wid', 0, PARAM_INT); $swid = optional_param('swid', 0, PARAM_INT); $group = optional_param('group', 0, PARAM_INT); $uid = optional_param('uid', 0, PARAM_INT); // 'create' action must be submitted by moodle form // so sesskey must be checked if ($action == 'create') { if (!confirm_sesskey()) { throw new \moodle_exception('invalidsesskey'); } } if (!empty($swid)) { $subwiki = wiki_get_subwiki($swid); if (!$wiki = wiki_get_wiki($subwiki->wikiid)) { throw new \moodle_exception('incorrectwikiid', 'wiki'); } } else { $subwiki = wiki_get_subwiki_by_group($wid, $group, $uid); if (!$wiki = wiki_get_wiki($wid)) { throw new \moodle_exception('incorrectwikiid', 'wiki'); } } if (!$cm = get_coursemodule_from_instance('wiki', $wiki->id)) { throw new \moodle_exception('invalidcoursemodule'); } $groups = new stdClass(); if (groups_get_activity_groupmode($cm)) { $modulecontext = context_module::instance($cm->id); $canaccessgroups = has_capability('moodle/site:accessallgroups', $modulecontext); if ($canaccessgroups) { $groups->availablegroups = groups_get_all_groups($cm->course, 0, 0, 'g.*', false, true); $allpart = new stdClass(); $allpart->id = '0'; $allpart->name = get_string('allparticipants'); array_unshift($groups->availablegroups, $allpart); } else { $groups->availablegroups = groups_get_all_groups($cm->course, $USER->id, 0, 'g.*', false, true); } if (!empty($group)) { $groups->currentgroup = $group; } else { $groups->currentgroup = groups_get_activity_group($cm); } } $course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST); require_login($course, true, $cm); // The title of the new page, cannot be empty. $title = optional_param('title', get_string('newpage', 'wiki'), PARAM_TEXT); $wikipage = new page_wiki_create($wiki, $subwiki, $cm); if (!empty($swid)) { $wikipage->set_gid($subwiki->groupid); $wikipage->set_uid($subwiki->userid); $wikipage->set_swid($swid); } else { $wikipage->set_wid($wid); $wikipage->set_gid($group); $wikipage->set_uid($uid); } $wikipage->set_availablegroups($groups); $wikipage->set_title($title); // set page action, and initialise moodle form $wikipage->set_action($action); switch ($action) { case 'create': $newpageid = $wikipage->create_page($title); redirect($CFG->wwwroot . '/mod/wiki/edit.php?pageid='.$newpageid); break; case 'new': // Go straight to editing if we know the page title and we're in force format mode. if ((int)$wiki->forceformat == 1 && $title != get_string('newpage', 'wiki')) { $newpageid = $wikipage->create_page($title); redirect($CFG->wwwroot . '/mod/wiki/edit.php?pageid='.$newpageid); } else { $wikipage->print_header(); // Create a new page. $wikipage->print_content($title); } $wikipage->print_footer(); break; }
Upload File
Create Folder