<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * category enrolment plugin event handler definition.
+ * Category enrolment plugin event handler definition.
*
- * @package enrol
- * @subpackage category
- * @copyright 2010 Petr Skoda {@link http://skodak.org}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package enrol_category
+ * @category event
+ * @copyright 2010 Petr Skoda {@link http://skodak.org}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
'internal' => 1,
),
-);
+);
\ No newline at end of file
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
/**
* Cohort enrolment plugin event handler definition.
*
- * @package enrol
- * @subpackage cohort
- * @copyright 2010 Petr Skoda {@link http://skodak.org}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package enrol_cohort
+ * @category event
+ * @copyright 2010 Petr Skoda {@link http://skodak.org}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
/**
* Meta course enrolment plugin event handler definition.
*
- * @package enrol
- * @subpackage meta
- * @copyright 2010 Petr Skoda {@link http://skodak.org}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package enrol_meta
+ * @category event
+ * @copyright 2010 Petr Skoda {@link http://skodak.org}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
* Definition of core event handler
* and description of all events throws from core.
*
- * @package core
- * @subpackage event
- * @copyright 2007 onwards Martin Dougiamas http://dougiamas.com
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core_event
+ * @category event
+ * @copyright 2007 onwards Martin Dougiamas http://dougiamas.com
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
*
* The public API is all at the end of this file.
*
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- * @package core
- * @subpackage event
+ * @package core_event
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
* Loads the events definitions for the component (from file). If no
* events are defined for the component, we simply return an empty array.
*
- * INTERNAL - to be used from eventslib only
+ * @access protected INTERNAL - to be used from eventslib only
*
* @param string $component examples: 'moodle', 'mod_forum', 'block_quiz_results'
* @return array of capabilities or empty array if not exists
* Gets the capabilities that have been cached in the database for this
* component.
*
- * INTERNAL - to be used from eventslib only
+ * @access protected INTERNAL - to be used from eventslib only
*
* @param string $component examples: 'moodle', 'mod_forum', 'block_quiz_results'
* @return array of events
* will cause any queued events for the component to be removed from
* the database.
*
+ * @category event
+ *
* @param string $component examples: 'moodle', 'mod_forum', 'block_quiz_results'
* @return boolean always returns true
*/
/**
* Remove all event handlers and queued events
*
+ * @category event
* @param string $component examples: 'moodle', 'mod_forum', 'block_quiz_results'
*/
function events_uninstall($component) {
/**
* Deletes cached events that are no longer needed by the component.
*
- * INTERNAL - to be used from eventslib only
+ * @access protected INTERNAL - to be used from eventslib only
*
* @param string $component examples: 'moodle', 'mod_forum', 'block_quiz_results'
* @param array $cachedhandlers array of the cached events definitions that will be
/****************** End of Events handler Definition code *******************/
/**
- * puts a handler on queue
+ * Puts a handler on queue
*
- * INTERNAL - to be used from eventslib only
+ * @access protected INTERNAL - to be used from eventslib only
*
- * @param object $handler event handler object from db
- * @param object $event event data object
+ * @param stdClass $handler event handler object from db
+ * @param stdClass $event event data object
* @param string $errormessage The error message indicating the problem
- * @return id number of new queue handler
+ * @return int id number of new queue handler
*/
function events_queue_handler($handler, $event, $errormessage) {
global $DB;
/**
* trigger a single event with a specified handler
*
- * INTERNAL - to be used from eventslib only
+ * @access protected INTERNAL - to be used from eventslib only
*
- * @param handler $hander object from db
- * @param eventdata $eventdata dataobject
+ * @param stdClass $hander Row from db
+ * @param stdClass $eventdata dataobject
* @param string $errormessage error message indicating problem
- * @return bool true means event processed, false means retry event later; may throw exception, NULL means internal error
+ * @return bool|null True means event processed, false means retry event later; may throw exception, NULL means internal error
*/
function events_dispatch($handler, $eventdata, &$errormessage) {
global $CFG;
/**
* given a queued handler, call the respective event handler to process the event
*
- * INTERNAL - to be used from eventslib only
+ * @access protected INTERNAL - to be used from eventslib only
*
- * @param object $qhandler events_queued_handler object from db
+ * @param stdClass $qhandler events_queued_handler row from db
* @return boolean true means event processed, false means retry later, NULL means fatal failure
*/
function events_process_queued_handler($qhandler) {
*
* Removes events_queue record from events_queue if no more references to this event object exists
*
- * INTERNAL - to be used from eventslib only
+ * @access protected INTERNAL - to be used from eventslib only
*
- * @param object $qhandler events_queued_handler object from db
+ * @param stdClass $qhandler events_queued_handler row from db
*/
function events_dequeue($qhandler) {
global $DB;
/**
* Returns handlers for given event. Uses caching for better perf.
*
- * INTERNAL - to be used from eventslib only
+ * @access protected INTERNAL - to be used from eventslib only
*
* @staticvar array $handlers
* @param string $eventanme name of even or 'reset'
- * @return mixed array of handlers or false otherwise
+ * @return array|false array of handlers or false otherwise
*/
function events_get_handlers($eventname) {
global $DB;
/**
* Events cron will try to empty the events queue by processing all the queued events handlers
*
- * PUBLIC
+ * @access public Part of the public API
+ * @category event
*
* @param string $eventname empty means all
- * @return number of dispatched events
+ * @return int number of dispatched events
*/
function events_cron($eventname='') {
global $DB;
/**
* Function to call all event handlers when triggering an event
*
- * PUBLIC
+ * @access public Part of the public API.
+ * @category event
*
* @param string $eventname name of the event
* @param object $eventdata event data object
/**
* checks if an event is registered for this component
*
+ * @access public Part of the public API
+ *
* @param string $eventname name of the event
* @param string $component component name, can be mod/data or moodle
* @return bool
/**
* checks if an event is queued for processing - either cron handlers attached or failed instant handlers
*
- * PUBLIC
+ * @access public Part of the public API
*
* @param string $eventname name of the event
* @return int number of queued events
WHERE h.eventname = ?";
return $DB->count_records_sql($sql, array($eventname));
-}
+}
\ No newline at end of file
<?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/>.
-///////////////////////////////////////////////////////////////////////////
-// Defines core event handlers //
-///////////////////////////////////////////////////////////////////////////
-// //
-// NOTICE OF COPYRIGHT //
-// //
-// Moodle - Modular Object-Oriented Dynamic Learning Environment //
-// http://moodle.org //
-// //
-// Copyright (C) 1999 onwards Martin Dougiamas http://moodle.com //
-// //
-// This program 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. //
-// //
-// This program 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: //
-// //
-// http://www.gnu.org/copyleft/gpl.html //
-// //
-///////////////////////////////////////////////////////////////////////////
-
+/**
+ * Definition of assignment event handlers
+ *
+ * @package mod_assignment
+ * @category event
+ * @copyright 1999 onwards Martin Dougiamas http://dougiamas.com
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
$handlers = array();
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
/**
* User logout event handler definition.
*
- * @package mod_chat
+ * @package mod_chat
+ * @category event
* @copyright 2010 Dongsheng Cai <dongsheng@moodle.com>
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/* List of handlers */
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
/**
* Meta course enrolment plugin event handler definition.
*
- * @package enrol_meta
+ * @package enrol_meta
+ * @category event
* @copyright 2010 Petr Skoda {@link http://skodak.org}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/* List of handlers */
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * Post-install code for the quiz module.
+ * Add event handlers for the quiz
*
- * @package mod
- * @subpackage quiz
+ * @package mod_quiz
+ * @category event
* @copyright 2011 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
<?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/>.
+
+/**
+ * Add event handlers for the googledocs portfolio.
+ *
+ * @package portfolio_googledocs
+ * @category event
+ * @copyright 2009 Penny Leach
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
$handlers = array (
'user_deleted' => array (
<?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/>.
+
+/**
+ * Add event handlers for the picasa portfolio.
+ *
+ * @package portfolio_picasa
+ * @category event
+ * @copyright 2009 Penny Leach
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
$handlers = array (
'user_deleted' => array (
'schedule' => 'cron',
'internal' => 0,
),
-);
-
-
+);
\ No newline at end of file