mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
forum MDL-21086 cleaned up boilderplates and php doc packages
This commit is contained in:
parent
496e3ccdd2
commit
8f685009b3
29 changed files with 721 additions and 136 deletions
|
@ -1,6 +1,27 @@
|
||||||
<?php
|
<?php
|
||||||
//This php script contains all the stuff to backup/restore
|
|
||||||
//forum mods
|
// 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/>.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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:
|
//This is the "graphical" structure of the forum mod:
|
||||||
//
|
//
|
||||||
|
|
|
@ -1,32 +1,51 @@
|
||||||
<?php
|
<?php
|
||||||
//
|
|
||||||
// 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]/<plugin_name>:<capabilityname>
|
|
||||||
//
|
|
||||||
// component_name should be the same as the directory name of the mod or block.
|
|
||||||
//
|
|
||||||
// Core moodle capabilities are defined thus:
|
|
||||||
// moodle/<capabilityclass>:<capabilityname>
|
|
||||||
//
|
|
||||||
// Examples: mod/forum:viewpost
|
|
||||||
// block/recent_activity:view
|
|
||||||
// moodle/site:deleteuser
|
|
||||||
//
|
|
||||||
// The variable name for the capability definitions array is $capabilities
|
|
||||||
|
|
||||||
|
// 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/>.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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]/<plugin_name>:<capabilityname>
|
||||||
|
*
|
||||||
|
* component_name should be the same as the directory name of the mod or block.
|
||||||
|
*
|
||||||
|
* Core moodle capabilities are defined thus:
|
||||||
|
* moodle/<capabilityclass>:<capabilityname>
|
||||||
|
*
|
||||||
|
* 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(
|
$capabilities = array(
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,30 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
// This file replaces:
|
// This file is part of Moodle - http://moodle.org/
|
||||||
// * STATEMENTS section in db/install.xml
|
//
|
||||||
// * lib.php/modulename_install() post installation hook
|
// Moodle is free software: you can redistribute it and/or modify
|
||||||
// * partially defaults.php
|
// 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/>.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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() {
|
function xmldb_forum_install() {
|
||||||
global $DB;
|
global $DB;
|
||||||
|
|
|
@ -1,30 +1,27 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
// This file is part of Moodle - http://moodle.org/
|
||||||
// Defines message providers (types of messages being sent) //
|
//
|
||||||
///////////////////////////////////////////////////////////////////////////
|
// Moodle is free software: you can redistribute it and/or modify
|
||||||
// //
|
// it under the terms of the GNU General Public License as published by
|
||||||
// NOTICE OF COPYRIGHT //
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// //
|
// (at your option) any later version.
|
||||||
// Moodle - Modular Object-Oriented Dynamic Learning Environment //
|
//
|
||||||
// http://moodle.org //
|
// Moodle is distributed in the hope that it will be useful,
|
||||||
// //
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// Copyright (C) 1999 onwards Martin Dougiamas http://moodle.com //
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// //
|
// GNU General Public License for more details.
|
||||||
// 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 //
|
// You should have received a copy of the GNU General Public License
|
||||||
// the Free Software Foundation; either version 2 of the License, or //
|
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||||
// (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 //
|
|
||||||
// //
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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 (
|
$messageproviders = array (
|
||||||
|
|
||||||
|
|
|
@ -1,24 +1,45 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
// This file keeps track of upgrades to
|
// This file is part of Moodle - http://moodle.org/
|
||||||
// the forum module
|
|
||||||
//
|
//
|
||||||
// Sometimes, changes between versions involve
|
// Moodle is free software: you can redistribute it and/or modify
|
||||||
// alterations to database structures and other
|
// it under the terms of the GNU General Public License as published by
|
||||||
// major things that may break installations.
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
//
|
//
|
||||||
// The upgrade function in this file will attempt
|
// Moodle is distributed in the hope that it will be useful,
|
||||||
// to perform all the necessary actions to upgrade
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// your older installtion to the current version.
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
//
|
//
|
||||||
// If there's something it cannot do itself, it
|
// You should have received a copy of the GNU General Public License
|
||||||
// will tell you what you need to do.
|
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
|
||||||
// The commands in here will all be database-neutral,
|
/**
|
||||||
// using the methods of database_manager class
|
* This file keeps track of upgrades to
|
||||||
//
|
* the forum module
|
||||||
// Please do not forget to use upgrade_set_timeout()
|
*
|
||||||
// before any action that may take longer time to finish.
|
* 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) {
|
function xmldb_forum_upgrade($oldversion) {
|
||||||
global $CFG, $DB, $OUTPUT;
|
global $CFG, $DB, $OUTPUT;
|
||||||
|
|
|
@ -1,7 +1,28 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
// Displays a post, and all the posts below it.
|
// This file is part of Moodle - http://moodle.org/
|
||||||
// If no post is given, displays all posts in a discussion
|
//
|
||||||
|
// 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/>.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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');
|
require_once('../../config.php');
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,26 @@
|
||||||
<?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/>.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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(dirname(__FILE__) . '/../../config.php');
|
||||||
require_once($CFG->dirroot . '/course/lib.php');
|
require_once($CFG->dirroot . '/course/lib.php');
|
||||||
require_once($CFG->dirroot . '/mod/forum/lib.php');
|
require_once($CFG->dirroot . '/mod/forum/lib.php');
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @package forum
|
* @package mod-forum
|
||||||
* @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
|
* @copyright 1999 onwards Martin Dougiamas {@link http://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
|
||||||
*/
|
*/
|
||||||
|
@ -7965,7 +7965,7 @@ function forum_get_extra_capabilities() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @package forum
|
* @package mod-forum
|
||||||
* @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
|
* @copyright 1999 onwards Martin Dougiamas {@link http://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
|
||||||
*/
|
*/
|
||||||
|
@ -8501,12 +8501,35 @@ function forum_extend_settings_navigation($settingsnav, $module=null) {
|
||||||
return $forumkey;
|
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 {
|
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;
|
protected $forumid = null;
|
||||||
|
/**
|
||||||
|
* The context of the forum this selector is being used for
|
||||||
|
* @var object
|
||||||
|
*/
|
||||||
protected $context = null;
|
protected $context = null;
|
||||||
|
/**
|
||||||
|
* The id of the current group
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
protected $currentgroup = null;
|
protected $currentgroup = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor method
|
||||||
|
* @param string $name
|
||||||
|
* @param array $options
|
||||||
|
*/
|
||||||
public function __construct($name, $options) {
|
public function __construct($name, $options) {
|
||||||
parent::__construct($name, $options);
|
parent::__construct($name, $options);
|
||||||
if (isset($options['context'])) {
|
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() {
|
protected function get_options() {
|
||||||
global $CFG;
|
global $CFG;
|
||||||
$options = parent::get_options();
|
$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 {
|
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;
|
protected $forcesubscribed = false;
|
||||||
|
/**
|
||||||
|
* Can be used to store existing subscribers so that they can be removed from
|
||||||
|
* the potential subscribers list
|
||||||
|
*/
|
||||||
protected $existingsubscribers = array();
|
protected $existingsubscribers = array();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor method
|
||||||
|
* @param string $name
|
||||||
|
* @param array $options
|
||||||
|
*/
|
||||||
public function __construct($name, $options) {
|
public function __construct($name, $options) {
|
||||||
parent::__construct($name, $options);
|
parent::__construct($name, $options);
|
||||||
if (isset($options['forcesubscribed'])) {
|
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() {
|
protected function get_options() {
|
||||||
$options = parent::get_options();
|
$options = parent::get_options();
|
||||||
if ($this->forcesubscribed===true) {
|
if ($this->forcesubscribed===true) {
|
||||||
|
@ -8552,6 +8603,15 @@ class forum_potential_subscriber_selector extends forum_subscriber_selector_base
|
||||||
return $options;
|
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) {
|
public function find_users($search) {
|
||||||
global $DB;
|
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) {
|
public function set_existing_subscribers(array $users) {
|
||||||
$this->existingsubscribers = $users;
|
$this->existingsubscribers = $users;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets this forum as force subscribed or not
|
||||||
|
*/
|
||||||
public function set_force_subscribed($setting=true) {
|
public function set_force_subscribed($setting=true) {
|
||||||
$this->forcesubscribed = 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 {
|
class forum_existing_subscriber_selector extends forum_subscriber_selector_base {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finds all subscribed users
|
||||||
|
*
|
||||||
|
* @param string $search
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
public function find_users($search) {
|
public function find_users($search) {
|
||||||
global $DB;
|
global $DB;
|
||||||
list($wherecondition, $params) = $this->search_sql($search, 'u');
|
list($wherecondition, $params) = $this->search_sql($search, 'u');
|
||||||
|
|
|
@ -1,6 +1,27 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
// Set tracking option for the forum.
|
// 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/>.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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("../../config.php");
|
||||||
require_once("lib.php");
|
require_once("lib.php");
|
||||||
|
|
|
@ -1,4 +1,26 @@
|
||||||
<?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/>.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package mod-forum
|
||||||
|
* @copyright Jamie Pratt <me@jamiep.org>
|
||||||
|
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||||
|
*/
|
||||||
|
|
||||||
require_once ($CFG->dirroot.'/course/moodleform_mod.php');
|
require_once ($CFG->dirroot.'/course/moodleform_mod.php');
|
||||||
|
|
||||||
class mod_forum_mod_form extends moodleform_mod {
|
class mod_forum_mod_form extends moodleform_mod {
|
||||||
|
|
|
@ -1,6 +1,27 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
// Edit and save a new post to a discussion
|
// 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/>.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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('../../config.php');
|
||||||
require_once('lib.php');
|
require_once('lib.php');
|
||||||
|
|
|
@ -1,5 +1,26 @@
|
||||||
<?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/>.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package mod-forum
|
||||||
|
* @copyright Jamie Pratt <me@jamiep.org>
|
||||||
|
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||||
|
*/
|
||||||
|
|
||||||
require_once($CFG->libdir.'/formslib.php');
|
require_once($CFG->libdir.'/formslib.php');
|
||||||
|
|
||||||
class mod_forum_post_form extends moodleform {
|
class mod_forum_post_form extends moodleform {
|
||||||
|
|
|
@ -1,8 +1,29 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
// Collect ratings, store them, then return to where we came from
|
// 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/>.
|
||||||
|
|
||||||
/// TODO: Centralise duplicate code in rate.php and rate_ajax.php
|
/**
|
||||||
|
* 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('../../config.php');
|
||||||
require_once('lib.php');
|
require_once('lib.php');
|
||||||
|
|
|
@ -1,32 +1,30 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
|
||||||
// //
|
|
||||||
// NOTICE OF COPYRIGHT //
|
|
||||||
// //
|
|
||||||
// Moodle - Modular Object-Oriented Dynamic Learning Environment //
|
|
||||||
// http://moodle.org //
|
|
||||||
// //
|
|
||||||
// Copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com //
|
|
||||||
// (C) 2001-3001 Eloy Lafuente (stronk7) http://contiento.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 2 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 //
|
|
||||||
// //
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
/// Accept, process and reply to ajax calls to rate forums
|
// 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/>.
|
||||||
|
|
||||||
/// TODO: Centralise duplicate code in rate.php and rate_ajax.php
|
/**
|
||||||
|
* 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('../../config.php');
|
||||||
require_once($CFG->dirroot . '/mod/forum/lib.php');
|
require_once($CFG->dirroot . '/mod/forum/lib.php');
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
/**
|
/**
|
||||||
* This file contains a custom renderer class used by the forum module.
|
* This file contains a custom renderer class used by the forum module.
|
||||||
*
|
*
|
||||||
* @package forum
|
* @package mod-forum
|
||||||
* @copyright 2009 Sam Hemelryk
|
* @copyright 2009 Sam Hemelryk
|
||||||
* @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
|
||||||
*/
|
*/
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
* A custom renderer class that extends the moodle_renderer_base and
|
* A custom renderer class that extends the moodle_renderer_base and
|
||||||
* is used by the forum module.
|
* is used by the forum module.
|
||||||
*
|
*
|
||||||
* @package forum
|
* @package mod-forum
|
||||||
* @copyright 2009 Sam Hemelryk
|
* @copyright 2009 Sam Hemelryk
|
||||||
* @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
|
||||||
**/
|
**/
|
||||||
|
|
|
@ -1,6 +1,27 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
// For a given post, shows a report of all the ratings it has
|
// 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/>.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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("../../config.php");
|
||||||
require_once("lib.php");
|
require_once("lib.php");
|
||||||
|
|
|
@ -1,6 +1,27 @@
|
||||||
<?php
|
<?php
|
||||||
//This php script contains all the stuff to backup/restore
|
|
||||||
//forum mods
|
// 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/>.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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:
|
//This is the "graphical" structure of the forum mod:
|
||||||
//
|
//
|
||||||
|
|
|
@ -1,9 +1,32 @@
|
||||||
<?php
|
<?php
|
||||||
//This file adds support to rss feeds generation
|
|
||||||
|
|
||||||
//This function is the main entry point to forum
|
// This file is part of Moodle - http://moodle.org/
|
||||||
//rss feeds generation. Foreach site forum with rss enabled
|
//
|
||||||
//build one XML rss structure.
|
// 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/>.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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() {
|
function forum_rss_feeds() {
|
||||||
|
|
||||||
global $CFG, $DB;
|
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) {
|
function forum_rss_delete_file($forum) {
|
||||||
global $CFG;
|
global $CFG;
|
||||||
$rssfile = rss_file_name('forum', $forum);
|
$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) {
|
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) {
|
if ($forum->rsstype == 1) {
|
||||||
$items = forum_rss_feed_discussions($forum, $time);
|
$items = forum_rss_feed_discussions($forum, $time);
|
||||||
} else {
|
} else {
|
||||||
|
@ -92,8 +126,13 @@
|
||||||
return (!empty($items));
|
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) {
|
function forum_rss_feed($forum) {
|
||||||
|
|
||||||
global $CFG;
|
global $CFG;
|
||||||
|
@ -145,8 +184,13 @@
|
||||||
return $status;
|
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) {
|
function forum_rss_feed_discussions($forum, $newsince=0) {
|
||||||
|
|
||||||
global $CFG, $DB;
|
global $CFG, $DB;
|
||||||
|
@ -200,8 +244,13 @@
|
||||||
return $items;
|
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) {
|
function forum_rss_feed_posts($forum, $newsince=0) {
|
||||||
|
|
||||||
global $CFG, $DB;
|
global $CFG, $DB;
|
||||||
|
@ -265,4 +314,3 @@
|
||||||
}
|
}
|
||||||
return $items;
|
return $items;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,26 @@
|
||||||
<?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/>.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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('../../config.php');
|
||||||
require_once('lib.php');
|
require_once('lib.php');
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,26 @@
|
||||||
<?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/>.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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');
|
require_once($CFG->dirroot.'/mod/forum/lib.php');
|
||||||
|
|
||||||
$settings->add(new admin_setting_configselect('forum_displaymode', get_string('displaymode', 'forum'),
|
$settings->add(new admin_setting_configselect('forum_displaymode', get_string('displaymode', 'forum'),
|
||||||
|
|
|
@ -1,6 +1,27 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
// Set tracking option for the forum.
|
// 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/>.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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("../../config.php");
|
||||||
require_once("lib.php");
|
require_once("lib.php");
|
||||||
|
|
|
@ -1,4 +1,29 @@
|
||||||
<?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/>.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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->libdir/simpletest/portfolio_testclass.php");
|
||||||
require_once("$CFG->dirroot/mod/forum/lib.php");
|
require_once("$CFG->dirroot/mod/forum/lib.php");
|
||||||
require_once("$CFG->dirroot/$CFG->admin/generator.php");
|
require_once("$CFG->dirroot/$CFG->admin/generator.php");
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
* @author T.J.Hunt@open.ac.uk
|
* @author T.J.Hunt@open.ac.uk
|
||||||
* @author nicolas@moodle.com
|
* @author nicolas@moodle.com
|
||||||
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
|
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
|
||||||
* @package mod/forum
|
* @package mod-forum
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('MOODLE_INTERNAL')) {
|
if (!defined('MOODLE_INTERNAL')) {
|
||||||
|
|
|
@ -1,6 +1,27 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
// Subscribe to or unsubscribe from a forum.
|
// 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/>.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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("../../config.php");
|
||||||
require_once("lib.php");
|
require_once("lib.php");
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
/**
|
/**
|
||||||
* This file is used to display and organise forum subscribers
|
* This file is used to display and organise forum subscribers
|
||||||
*
|
*
|
||||||
* @package forum
|
* @package mod-forum
|
||||||
* @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
|
* @copyright 1999 onwards Martin Dougiamas {@link http://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
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,5 +1,26 @@
|
||||||
<?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/>.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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("../../config.php");
|
||||||
require_once("lib.php");
|
require_once("lib.php");
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,27 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
// Display user activity reports for a course
|
// 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/>.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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('../../config.php');
|
||||||
require_once('lib.php');
|
require_once('lib.php');
|
||||||
|
|
|
@ -1,9 +1,28 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
// This file is part of Moodle - http://moodle.org/
|
||||||
// Code fragment to define the module version etc.
|
//
|
||||||
// This fragment is called by /admin/index.php
|
// 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/>.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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->version = 2009050400;
|
||||||
$module->requires = 2009041700; // Requires this Moodle version
|
$module->requires = 2009041700; // Requires this Moodle version
|
||||||
|
|
|
@ -1,5 +1,26 @@
|
||||||
<?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/>.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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('../../config.php');
|
||||||
require_once('lib.php');
|
require_once('lib.php');
|
||||||
require_once("$CFG->libdir/rsslib.php");
|
require_once("$CFG->libdir/rsslib.php");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue