From 8f685009b3b84522b099288c95ace3f96b8fec33 Mon Sep 17 00:00:00 2001 From: Sam Hemelryk Date: Thu, 10 Dec 2009 03:11:18 +0000 Subject: [PATCH] forum MDL-21086 cleaned up boilderplates and php doc packages --- mod/forum/backuplib.php | 25 +++++- mod/forum/db/access.php | 69 +++++++++------ mod/forum/db/install.php | 29 ++++++- mod/forum/db/messages.php | 47 +++++------ mod/forum/db/upgrade.php | 53 ++++++++---- mod/forum/discuss.php | 25 +++++- mod/forum/index.php | 21 +++++ mod/forum/lib.php | 83 ++++++++++++++++++- mod/forum/markposts.php | 23 ++++- mod/forum/mod_form.php | 22 +++++ mod/forum/post.php | 23 ++++- mod/forum/post_form.php | 21 +++++ mod/forum/rate.php | 29 ++++++- mod/forum/rate_ajax.php | 52 ++++++------ mod/forum/renderer.php | 4 +- mod/forum/report.php | 23 ++++- mod/forum/restorelib.php | 25 +++++- mod/forum/rsslib.php | 78 +++++++++++++---- mod/forum/search.php | 21 +++++ mod/forum/settings.php | 21 +++++ mod/forum/settracking.php | 23 ++++- .../test_forum_portfolio_callers.php | 25 ++++++ mod/forum/simpletest/testmodforumlib.php | 2 +- mod/forum/subscribe.php | 23 ++++- mod/forum/subscribers.php | 2 +- mod/forum/unsubscribeall.php | 21 +++++ mod/forum/user.php | 23 ++++- mod/forum/version.php | 27 +++++- mod/forum/view.php | 21 +++++ 29 files changed, 723 insertions(+), 138 deletions(-) diff --git a/mod/forum/backuplib.php b/mod/forum/backuplib.php index f8bbe2d571..b7921cfac0 100644 --- a/mod/forum/backuplib.php +++ b/mod/forum/backuplib.php @@ -1,6 +1,27 @@ . + +/** + * This php script contains all the stuff to backup/restore forum mods + * + * @package mod-forum + * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ //This is the "graphical" structure of the forum mod: // diff --git a/mod/forum/db/access.php b/mod/forum/db/access.php index fd144f1e35..3523b8c19d 100644 --- a/mod/forum/db/access.php +++ b/mod/forum/db/access.php @@ -1,32 +1,51 @@ : -// -// component_name should be the same as the directory name of the mod or block. -// -// Core moodle capabilities are defined thus: -// moodle/: +// 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. // -// Examples: mod/forum:viewpost -// block/recent_activity:view -// moodle/site:deleteuser +// 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. // -// The variable name for the capability definitions array is $capabilities - +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Capability definitions for the forum module. + * + * The capabilities are loaded into the database table when the module is + * installed or updated. Whenever the capability definitions are updated, + * the module version number should be bumped up. + * + * The system has four possible values for a capability: + * CAP_ALLOW, CAP_PREVENT, CAP_PROHIBIT, and inherit (not set). + * + * CAPABILITY NAMING CONVENTION + * + * It is important that capability names are unique. The naming convention + * for capabilities that are specific to modules and blocks is as follows: + * [mod/block]/: + * + * component_name should be the same as the directory name of the mod or block. + * + * Core moodle capabilities are defined thus: + * moodle/: + * + * Examples: mod/forum:viewpost + * block/recent_activity:view + * moodle/site:deleteuser + * + * The variable name for the capability definitions array is $capabilities + * + * @package mod-forum + * @copyright 2006 vyshane + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ $capabilities = array( diff --git a/mod/forum/db/install.php b/mod/forum/db/install.php index c17fa21b6a..d171d397a0 100644 --- a/mod/forum/db/install.php +++ b/mod/forum/db/install.php @@ -1,9 +1,30 @@ . + +/** + * This file replaces: + * - STATEMENTS section in db/install.xml + * - lib.php/modulename_install() post installation hook + * - partially defaults.php + * + * @package mod-forum + * @copyright 2009 Petr Skoda (http://skodak.org) + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ function xmldb_forum_install() { global $DB; diff --git a/mod/forum/db/messages.php b/mod/forum/db/messages.php index 154d977cef..420dc0edfc 100644 --- a/mod/forum/db/messages.php +++ b/mod/forum/db/messages.php @@ -1,30 +1,27 @@ . + +/** + * Defines message providers (types of messages being sent) + * + * @package mod-forum + * @copyright 1999 onwards Martin Dougiamas http://moodle.com + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ $messageproviders = array ( diff --git a/mod/forum/db/upgrade.php b/mod/forum/db/upgrade.php index 39480eb6f0..283ba240b2 100644 --- a/mod/forum/db/upgrade.php +++ b/mod/forum/db/upgrade.php @@ -1,24 +1,45 @@ . + +/** + * This file keeps track of upgrades to + * the forum module + * + * Sometimes, changes between versions involve + * alterations to database structures and other + * major things that may break installations. + * + * The upgrade function in this file will attempt + * to perform all the necessary actions to upgrade + * your older installtion to the current version. + * + * If there's something it cannot do itself, it + * will tell you what you need to do. + * + * The commands in here will all be database-neutral, + * using the methods of database_manager class + * + * Please do not forget to use upgrade_set_timeout() + * before any action that may take longer time to finish. + * + * @package mod-forum + * @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ function xmldb_forum_upgrade($oldversion) { global $CFG, $DB, $OUTPUT; diff --git a/mod/forum/discuss.php b/mod/forum/discuss.php index ed1a9adf35..4bb2956d79 100644 --- a/mod/forum/discuss.php +++ b/mod/forum/discuss.php @@ -1,7 +1,28 @@ . + +/** + * Displays a post, and all the posts below it. + * If no post is given, displays all posts in a discussion + * + * @package mod-forum + * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ require_once('../../config.php'); diff --git a/mod/forum/index.php b/mod/forum/index.php index 702d76ecfd..447269e238 100644 --- a/mod/forum/index.php +++ b/mod/forum/index.php @@ -1,5 +1,26 @@ . + +/** + * @package mod-forum + * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + require_once(dirname(__FILE__) . '/../../config.php'); require_once($CFG->dirroot . '/course/lib.php'); require_once($CFG->dirroot . '/mod/forum/lib.php'); diff --git a/mod/forum/lib.php b/mod/forum/lib.php index 4406e729bc..d2af1a2d9c 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -16,7 +16,7 @@ // along with Moodle. If not, see . /** - * @package forum + * @package mod-forum * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ @@ -7965,7 +7965,7 @@ function forum_get_extra_capabilities() { } /** - * @package forum + * @package mod-forum * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ @@ -8501,12 +8501,35 @@ function forum_extend_settings_navigation($settingsnav, $module=null) { return $forumkey; } +/** + * Abstract class used by forum subscriber selection controls + * @package mod-forum + * @copyright 2009 Sam Hemelryk + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ abstract class forum_subscriber_selector_base extends user_selector_base { + /** + * The id of the forum this selector is being used for + * @var int + */ protected $forumid = null; + /** + * The context of the forum this selector is being used for + * @var object + */ protected $context = null; + /** + * The id of the current group + * @var int + */ protected $currentgroup = null; + /** + * Constructor method + * @param string $name + * @param array $options + */ public function __construct($name, $options) { parent::__construct($name, $options); if (isset($options['context'])) { @@ -8520,6 +8543,11 @@ abstract class forum_subscriber_selector_base extends user_selector_base { } } + /** + * Returns an array of options to seralise and store for searches + * + * @return array + */ protected function get_options() { global $CFG; $options = parent::get_options(); @@ -8532,11 +8560,30 @@ abstract class forum_subscriber_selector_base extends user_selector_base { } +/** + * A user selector control for potential subscribers to the selected forum + * @package mod-forum + * @copyright 2009 Sam Hemelryk + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ class forum_potential_subscriber_selector extends forum_subscriber_selector_base { + /** + * If set to true EVERYONE in this course is force subscribed to this forum + * @var bool + */ protected $forcesubscribed = false; + /** + * Can be used to store existing subscribers so that they can be removed from + * the potential subscribers list + */ protected $existingsubscribers = array(); + /** + * Constructor method + * @param string $name + * @param array $options + */ public function __construct($name, $options) { parent::__construct($name, $options); if (isset($options['forcesubscribed'])) { @@ -8544,6 +8591,10 @@ class forum_potential_subscriber_selector extends forum_subscriber_selector_base } } + /** + * Returns an arary of options for this control + * @return array + */ protected function get_options() { $options = parent::get_options(); if ($this->forcesubscribed===true) { @@ -8552,6 +8603,15 @@ class forum_potential_subscriber_selector extends forum_subscriber_selector_base return $options; } + /** + * Finds all potential users + * + * Potential users are determined by checking for users with a capability + * determined in {@see forum_get_potential_subscribers()} + * + * @param string $search + * @return array + */ public function find_users($search) { global $DB; @@ -8586,17 +8646,36 @@ class forum_potential_subscriber_selector extends forum_subscriber_selector_base } } + /** + * Sets the existing subscribers + * @param array $users + */ public function set_existing_subscribers(array $users) { $this->existingsubscribers = $users; } + /** + * Sets this forum as force subscribed or not + */ public function set_force_subscribed($setting=true) { $this->forcesubscribed = true; } } +/** + * User selector control for removing subscribed users + * @package mod-forum + * @copyright 2009 Sam Hemelryk + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ class forum_existing_subscriber_selector extends forum_subscriber_selector_base { + /** + * Finds all subscribed users + * + * @param string $search + * @return array + */ public function find_users($search) { global $DB; list($wherecondition, $params) = $this->search_sql($search, 'u'); diff --git a/mod/forum/markposts.php b/mod/forum/markposts.php index a9b151ccf8..0fcef34594 100644 --- a/mod/forum/markposts.php +++ b/mod/forum/markposts.php @@ -1,6 +1,27 @@ . + +/** + * Set tracking option for the forum. + * + * @package mod-forum + * @copyright 2005 mchurch + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ require_once("../../config.php"); require_once("lib.php"); diff --git a/mod/forum/mod_form.php b/mod/forum/mod_form.php index efcd79937c..aa9b2ea6f1 100644 --- a/mod/forum/mod_form.php +++ b/mod/forum/mod_form.php @@ -1,4 +1,26 @@ . + +/** + * @package mod-forum + * @copyright Jamie Pratt + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + require_once ($CFG->dirroot.'/course/moodleform_mod.php'); class mod_forum_mod_form extends moodleform_mod { diff --git a/mod/forum/post.php b/mod/forum/post.php index 9f2f1da12b..aad4bf2ec8 100644 --- a/mod/forum/post.php +++ b/mod/forum/post.php @@ -1,6 +1,27 @@ . + +/** + * Edit and save a new post to a discussion + * + * @package mod-forum + * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ require_once('../../config.php'); require_once('lib.php'); diff --git a/mod/forum/post_form.php b/mod/forum/post_form.php index 200e8bdcbd..746421b9fe 100644 --- a/mod/forum/post_form.php +++ b/mod/forum/post_form.php @@ -1,5 +1,26 @@ . + +/** + * @package mod-forum + * @copyright Jamie Pratt + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + require_once($CFG->libdir.'/formslib.php'); class mod_forum_post_form extends moodleform { diff --git a/mod/forum/rate.php b/mod/forum/rate.php index 85a506ae26..1f2228b302 100644 --- a/mod/forum/rate.php +++ b/mod/forum/rate.php @@ -1,8 +1,29 @@ . + +/** + * Collect ratings, store them, then return to where we came from + * + * TODO: Centralise duplicate code in rate.php and rate_ajax.php + * + * @package mod-forum + * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ require_once('../../config.php'); require_once('lib.php'); @@ -23,7 +44,7 @@ if (!$cm = get_coursemodule_from_instance('forum', $forum->id)) { print_error('invalidcoursemodule'); } else { $forum->cmidnumber = $cm->id; //MDL-12961 - } +} require_login($course, false, $cm); diff --git a/mod/forum/rate_ajax.php b/mod/forum/rate_ajax.php index 21b41e822b..2c52446e03 100644 --- a/mod/forum/rate_ajax.php +++ b/mod/forum/rate_ajax.php @@ -1,32 +1,30 @@ . + +/** + * Accept, process and reply to ajax calls to rate forums + * + * TODO: Centralise duplicate code in rate.php and rate_ajax.php + * + * @package mod-forum + * @copyright 2001 Eloy Lafuente (stronk7) http://contiento.com + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ require_once('../../config.php'); require_once($CFG->dirroot . '/mod/forum/lib.php'); diff --git a/mod/forum/renderer.php b/mod/forum/renderer.php index c1f4ade4e6..7407aed098 100644 --- a/mod/forum/renderer.php +++ b/mod/forum/renderer.php @@ -18,7 +18,7 @@ /** * This file contains a custom renderer class used by the forum module. * - * @package forum + * @package mod-forum * @copyright 2009 Sam Hemelryk * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ @@ -27,7 +27,7 @@ * A custom renderer class that extends the moodle_renderer_base and * is used by the forum module. * - * @package forum + * @package mod-forum * @copyright 2009 Sam Hemelryk * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later **/ diff --git a/mod/forum/report.php b/mod/forum/report.php index 1b576f5321..9b715371c9 100644 --- a/mod/forum/report.php +++ b/mod/forum/report.php @@ -1,6 +1,27 @@ . + +/** + * For a given post, shows a report of all the ratings it has + * + * @package mod-forum + * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ require_once("../../config.php"); require_once("lib.php"); diff --git a/mod/forum/restorelib.php b/mod/forum/restorelib.php index 06f0778a9e..fe4f8142e8 100644 --- a/mod/forum/restorelib.php +++ b/mod/forum/restorelib.php @@ -1,6 +1,27 @@ . + +/** + * This php script contains all the stuff to backup/restore forum mods + * + * @package mod-forum + * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ //This is the "graphical" structure of the forum mod: // diff --git a/mod/forum/rsslib.php b/mod/forum/rsslib.php index 69034265fa..ecc5276290 100644 --- a/mod/forum/rsslib.php +++ b/mod/forum/rsslib.php @@ -1,9 +1,32 @@ . + +/** + * This file adds support to rss feeds generation + * + * @package mod-forum + * @copyright 2001 Eloy Lafuente (stronk7) http://contiento.com + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + + /** + * This function is the main entry point to forum rss feeds generation. + * Foreach site forum with rss enabled build one XML rss structure. + */ function forum_rss_feeds() { global $CFG, $DB; @@ -69,7 +92,12 @@ } - // Given a forum object, deletes the RSS file + /** + * Given a forum object, deletes the RSS file + * + * @param 0object $forum + * @return bool + */ function forum_rss_delete_file($forum) { global $CFG; $rssfile = rss_file_name('forum', $forum); @@ -81,9 +109,15 @@ } + /** + * If there is new stuff in the forum since $time then this returns + * true. Otherwise it returns false. + * + * @param object $forum + * @param int $time + * @return bool + */ function forum_rss_newstuff($forum, $time) { - // If there is new stuff in the forum since $time then this returns - // true. Otherwise it returns false. if ($forum->rsstype == 1) { $items = forum_rss_feed_discussions($forum, $time); } else { @@ -92,8 +126,13 @@ return (!empty($items)); } - //This function return the XML rss contents about the forum record passed as parameter - //It returns false if something is wrong + /** + * This function return the XML rss contents about the forum record passed as parameter + * It returns false if something is wrong + * + * @param object $forum + * @param bool + */ function forum_rss_feed($forum) { global $CFG; @@ -145,8 +184,13 @@ return $status; } - //This function returns "items" record array to be used to build the rss feed - //for a Type=discussions forum + /** + * This function returns "items" record array to be used to build the rss feed + * for a Type=discussions forum + * + * @param object $forum + * @param int $newsince + */ function forum_rss_feed_discussions($forum, $newsince=0) { global $CFG, $DB; @@ -200,8 +244,13 @@ return $items; } - //This function returns "items" record array to be used to build the rss feed - //for a Type=posts forum + /** + * This function returns "items" record array to be used to build the rss feed + * for a Type=posts forum + * + * @param object $forum + * @param int $newsince + */ function forum_rss_feed_posts($forum, $newsince=0) { global $CFG, $DB; @@ -264,5 +313,4 @@ } } return $items; - } - + } \ No newline at end of file diff --git a/mod/forum/search.php b/mod/forum/search.php index b61e0184cd..96a6fc45ac 100644 --- a/mod/forum/search.php +++ b/mod/forum/search.php @@ -1,5 +1,26 @@ . + +/** + * @package mod-forum + * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + require_once('../../config.php'); require_once('lib.php'); diff --git a/mod/forum/settings.php b/mod/forum/settings.php index 2e44c7c8c0..6a8b00754d 100644 --- a/mod/forum/settings.php +++ b/mod/forum/settings.php @@ -1,5 +1,26 @@ . + +/** + * @package mod-forum + * @copyright 2009 Petr Skoda (http://skodak.org) + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + require_once($CFG->dirroot.'/mod/forum/lib.php'); $settings->add(new admin_setting_configselect('forum_displaymode', get_string('displaymode', 'forum'), diff --git a/mod/forum/settracking.php b/mod/forum/settracking.php index 0542e65764..30189a5574 100644 --- a/mod/forum/settracking.php +++ b/mod/forum/settracking.php @@ -1,6 +1,27 @@ . + +/** + * Set tracking option for the forum. + * + * @package mod-forum + * @copyright 2005 mchurch + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ require_once("../../config.php"); require_once("lib.php"); diff --git a/mod/forum/simpletest/test_forum_portfolio_callers.php b/mod/forum/simpletest/test_forum_portfolio_callers.php index 88eb9617cf..dea8d5d99d 100644 --- a/mod/forum/simpletest/test_forum_portfolio_callers.php +++ b/mod/forum/simpletest/test_forum_portfolio_callers.php @@ -1,4 +1,29 @@ . + +/** + * Code fragment to define the module version etc. + * This fragment is called by /admin/index.php + * + * @package mod-forum + * @copyright 2008 Nicolas Connault + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + require_once("$CFG->libdir/simpletest/portfolio_testclass.php"); require_once("$CFG->dirroot/mod/forum/lib.php"); require_once("$CFG->dirroot/$CFG->admin/generator.php"); diff --git a/mod/forum/simpletest/testmodforumlib.php b/mod/forum/simpletest/testmodforumlib.php index 4e71e4f211..b42ff68aca 100644 --- a/mod/forum/simpletest/testmodforumlib.php +++ b/mod/forum/simpletest/testmodforumlib.php @@ -30,7 +30,7 @@ * @author T.J.Hunt@open.ac.uk * @author nicolas@moodle.com * @license http://www.gnu.org/copyleft/gpl.html GNU Public License - * @package mod/forum + * @package mod-forum */ if (!defined('MOODLE_INTERNAL')) { diff --git a/mod/forum/subscribe.php b/mod/forum/subscribe.php index 9624fbfd8a..0c75669a74 100644 --- a/mod/forum/subscribe.php +++ b/mod/forum/subscribe.php @@ -1,6 +1,27 @@ . + +/** + * Subscribe to or unsubscribe from a forum. + * + * @package mod-forum + * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ require_once("../../config.php"); require_once("lib.php"); diff --git a/mod/forum/subscribers.php b/mod/forum/subscribers.php index 477c4db004..597a8546c6 100644 --- a/mod/forum/subscribers.php +++ b/mod/forum/subscribers.php @@ -18,7 +18,7 @@ /** * This file is used to display and organise forum subscribers * - * @package forum + * @package mod-forum * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ diff --git a/mod/forum/unsubscribeall.php b/mod/forum/unsubscribeall.php index c19b8e7148..c06c634f5d 100644 --- a/mod/forum/unsubscribeall.php +++ b/mod/forum/unsubscribeall.php @@ -1,5 +1,26 @@ . + +/** + * @package mod-forum + * @copyright 2008 Petr Skoda (http://skodak.org) + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + require_once("../../config.php"); require_once("lib.php"); diff --git a/mod/forum/user.php b/mod/forum/user.php index a29996d3b9..1abe683fa4 100644 --- a/mod/forum/user.php +++ b/mod/forum/user.php @@ -1,6 +1,27 @@ . + +/** + * Display user activity reports for a course + * + * @package mod-forum + * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ require_once('../../config.php'); require_once('lib.php'); diff --git a/mod/forum/version.php b/mod/forum/version.php index a75b9412ca..90e2a6cb71 100644 --- a/mod/forum/version.php +++ b/mod/forum/version.php @@ -1,9 +1,28 @@ . + +/** + * Code fragment to define the module version etc. + * This fragment is called by /admin/index.php + * + * @package mod-forum + * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ $module->version = 2009050400; $module->requires = 2009041700; // Requires this Moodle version diff --git a/mod/forum/view.php b/mod/forum/view.php index c0bf599376..4a569b7466 100644 --- a/mod/forum/view.php +++ b/mod/forum/view.php @@ -1,5 +1,26 @@ . + +/** + * @package mod-forum + * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + require_once('../../config.php'); require_once('lib.php'); require_once("$CFG->libdir/rsslib.php"); -- 2.39.5