Commit 8571833f authored by Petr Skoda's avatar Petr Skoda
Browse files

MDL-23069 moving version and cron info into standard version.php - finally, yay!

parent 411b8c23
<?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/>.
$plugin->version = 2007101509;
......@@ -76,12 +76,6 @@ class block_base {
*/
var $edit_controls = NULL;
/**
* The current version that the block type defines.
* @var string $version
*/
var $version = NULL;
/**
* The initialized instance of this block object.
* @var block $instance
......@@ -115,20 +109,12 @@ class block_base {
/// Class Functions
/**
* The class constructor
*
*/
function block_base() {
$this->init();
}
/**
* Fake constructor to keep PHP5 happy
*
*/
function __construct() {
$this->block_base();
$this->init();
}
/**
......@@ -300,19 +286,6 @@ class block_base {
return $this->content_type;
}
/**
* Returns the class $version var value.
*
* Intentionally doesn't check if a version is set.
* This is already done in {@link _self_test()}
*
* @return string $this->version
*/
function get_version() {
// Intentionally doesn't check if a version is set. This is already done in _self_test()
return $this->version;
}
/**
* Returns true or false, depending on whether this block has any content to display
* and whether the user has permission to view the block
......@@ -444,11 +417,6 @@ class block_base {
$errors[] = 'content_not_set';
$correct = false;
}*/
if ($this->get_version() === NULL) {
$errors[] = 'version_not_set';
$correct = false;
}
$formats = $this->applicable_formats();
if (empty($formats) || array_sum($formats) === 0) {
$errors[] = 'no_formats';
......
......@@ -37,7 +37,6 @@ class block_myprofile extends block_base {
*/
public function init() {
$this->title = get_string('pluginname', 'block_myprofile');
$this->version = 2009123100;
}
/**
......
<?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/>.
$plugin->version = 2009123100;
......@@ -59,7 +59,6 @@ class block_navigation extends block_base {
global $CFG;
$this->blockname = get_class($this);
$this->title = get_string('pluginname', $this->blockname);
$this->version = 2009082800;
}
/**
......
<?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/>.
$plugin->version = 2009082800;
......@@ -3,7 +3,6 @@
class block_news_items extends block_base {
function init() {
$this->title = get_string('pluginname', 'block_news_items');
$this->version = 2007101509;
}
function get_content() {
......
<?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/>.
$plugin->version = 2007101509;
......@@ -8,7 +8,6 @@
class block_online_users extends block_base {
function init() {
$this->title = get_string('pluginname','block_online_users');
$this->version = 2007101510;
}
function has_config() {return true;}
......@@ -80,7 +79,7 @@ class block_online_users extends block_base {
$sql = "SELECT $userfields, MAX(ul.timeaccess) AS lastaccess
FROM {user_lastaccess} ul, {user} u $groupmembers $rafrom
JOIN ($esqljoin) euj ON euj.id = u.id
JOIN ($esqljoin) euj ON euj.id = u.id
WHERE ul.timeaccess > $timefrom
AND u.id = ul.userid
AND ul.courseid = :courseid
......
<?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/>.
$plugin->version = 2007101510;
......@@ -3,7 +3,6 @@
class block_participants extends block_list {
function init() {
$this->title = get_string('pluginname', 'block_participants');
$this->version = 2007101509;
}
function get_content() {
......
<?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/>.
$plugin->version = 2007101509;
......@@ -31,7 +31,6 @@ class block_private_files extends block_base {
function init() {
$this->title = get_string('areauserpersonal', 'repository');
$this->version = 2010030100;
}
function specialization() {
......
<?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/>.
$plugin->version = 2010030100;
......@@ -10,7 +10,6 @@ define('B_QUIZRESULTS_GRADE_FORMAT_ABS', 3);
class block_quiz_results extends block_base {
function init() {
$this->title = get_string('pluginname', 'block_quiz_results');
$this->version = 2007101509;
}
function applicable_formats() {
......
<?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/>.
$plugin->version = 2007101509;
......@@ -3,7 +3,6 @@
class block_recent_activity extends block_base {
function init() {
$this->title = get_string('pluginname', 'block_recent_activity');
$this->version = 2007101509;
}
function get_content() {
......
<?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/>.
$plugin->version = 2007101509;
......@@ -27,8 +27,6 @@
function init() {
$this->title = get_string('feedstitle', 'block_rss_client');
$this->version = 2009072901;
$this->cron = 300; /// Set min time between cron executions to 300 secs (5 mins)
}
function preferred_width() {
......
<?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/>.
$plugin->version = 2009072901;
$plugin->cron = 300; /// Set min time between cron executions to 300 secs (5 mins)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment