X7ROOT File Manager
Current Path:
/home/cbholdings/pasukulu/mod/glossary
home
/
cbholdings
/
pasukulu
/
mod
/
glossary
/
📁
..
📄
README.txt
(1.7 KB)
📄
TODO.txt
(607 B)
📄
approve.php
(2.22 KB)
📁
backup
📁
classes
📁
db
📄
deleteentry.php
(2.87 KB)
📄
deprecatedlib.php
(2.27 KB)
📄
edit.php
(3.43 KB)
📄
edit_form.php
(7.12 KB)
📄
editcategories.html
(3.29 KB)
📄
editcategories.php
(10.89 KB)
📄
export.php
(2.95 KB)
📄
exportentry.php
(4.47 KB)
📁
formats
📄
formats.php
(9.51 KB)
📄
import.php
(15.58 KB)
📄
import_form.php
(1.13 KB)
📄
index.php
(4.36 KB)
📁
lang
📄
lib.php
(164.78 KB)
📄
locallib.php
(29.25 KB)
📄
mod_form.php
(10.57 KB)
📁
pix
📄
print.php
(6.94 KB)
📄
rsslib.php
(7.87 KB)
📄
settings.php
(2.7 KB)
📄
showentry.php
(3.42 KB)
📄
showentry_ajax.php
(3.78 KB)
📄
sql.php
(3.83 KB)
📄
styles.css
(2.5 KB)
📄
tabs.php
(2.46 KB)
📁
templates
📁
tests
📄
upgrade.txt
(1.25 KB)
📄
version.php
(1.2 KB)
📄
view.php
(17.41 KB)
Editing: approve.php
<?php require_once("../../config.php"); require_once("lib.php"); $eid = required_param('eid', PARAM_INT); // Entry ID $newstate = optional_param('newstate', 1, PARAM_BOOL); $mode = optional_param('mode', 'approval', PARAM_ALPHA); $hook = optional_param('hook', 'ALL', PARAM_CLEAN); $url = new moodle_url('/mod/glossary/approve.php', array('eid' => $eid, 'mode' => $mode, 'hook' => $hook, 'newstate' => $newstate)); $PAGE->set_url($url); $entry = $DB->get_record('glossary_entries', array('id'=> $eid), '*', MUST_EXIST); $glossary = $DB->get_record('glossary', array('id'=> $entry->glossaryid), '*', MUST_EXIST); $cm = get_coursemodule_from_instance('glossary', $glossary->id, 0, false, MUST_EXIST); $course = $DB->get_record('course', array('id'=> $cm->course), '*', MUST_EXIST); require_login($course, false, $cm); $context = context_module::instance($cm->id); require_capability('mod/glossary:approve', $context); if (($newstate != $entry->approved) && confirm_sesskey()) { $newentry = new stdClass(); $newentry->id = $entry->id; $newentry->approved = $newstate; $newentry->timemodified = time(); // wee need this date here to speed up recent activity, TODO: use timestamp in approved field instead in 2.0 $DB->update_record("glossary_entries", $newentry); // Trigger event about entry approval/disapproval. $params = array( 'context' => $context, 'objectid' => $entry->id ); if ($newstate) { $event = \mod_glossary\event\entry_approved::create($params); } else { $event = \mod_glossary\event\entry_disapproved::create($params); } $entry->approved = $newstate ? 1 : 0; $entry->timemodified = $newentry->timemodified; $event->add_record_snapshot('glossary_entries', $entry); $event->trigger(); // Update completion state $completion = new completion_info($course); if ($completion->is_enabled($cm) == COMPLETION_TRACKING_AUTOMATIC && $glossary->completionentries) { $completion->update_state($cm, COMPLETION_COMPLETE, $entry->userid); } // Reset caches. if ($entry->usedynalink) { \mod_glossary\local\concept_cache::reset_glossary($glossary); } } redirect("view.php?id=$cm->id&mode=$mode&hook=$hook");
Upload File
Create Folder