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
......@@ -126,7 +126,16 @@
if (!file_exists("$CFG->dirroot/blocks/$blockname/block_$blockname.php")) {
$blockobject = false;
$strblockname = '<span class="notifyproblem">'.$blockname.' ('.get_string('missingfromdisk').')</span>';
$plugin = new object();
$plugin->version = $block->version;
} else {
$plugin = new object();
$plugin->version = '???';
if (file_exists("$CFG->dirroot/blocks/$blockname/version.php")) {
include("$CFG->dirroot/blocks/$blockname/version.php");
}
if (!$blockobject = block_instance($block->name)) {
$incompatible[] = $block;
continue;
......@@ -172,14 +181,17 @@
$class = ' class="dimmed_text"'; // Leading space required!
}
if ($blockobject) {
$blockobject->get_version();
if ($block->version == $plugin->version) {
$version = $block->version;
} else {
$version = "$block->version ($plugin->version)";
}
$table->add_data(array(
'<span'.$class.'>'.$strblockname.'</span>',
$blocklist,
'<span'.$class.'>'.$block->version.'</span>',
'<span'.$class.'>'.$version.'</span>',
$visible,
$delete,
$settings
......
......@@ -3,7 +3,6 @@
class block_activity_modules extends block_list {
function init() {
$this->title = get_string('pluginname', 'block_activity_modules');
$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_admin_bookmarks extends block_base {
function init() {
$this->title = get_string('pluginname', 'block_admin_bookmarks');
$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;
......@@ -37,7 +37,6 @@ class block_blog_menu extends block_base {
function init() {
$this->title = get_string('pluginname', 'block_blog_menu');
$this->version = 2009071700;
}
function instance_allow_multiple() {
......
<?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 = 2009071700;
......@@ -37,7 +37,6 @@ class block_blog_recent extends block_base {
function init() {
$this->title = get_string('pluginname', 'block_blog_recent');
$this->content_type = BLOCK_TYPE_TEXT;
$this->version = 2009070900;
}
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 = 2009070900;
<?php
//TODO: fix these sloppy constant names or move them elsewhere!
define('BLOGDEFAULTTIMEWITHIN', 90);
define('BLOGDEFAULTNUMBEROFTAGS', 20);
define('BLOGDEFAULTSORT', 'name');
......@@ -8,7 +10,6 @@ require_once($CFG->dirroot .'/blog/lib.php');
class block_blog_tags extends block_base {
function init() {
$this->version = 2007101509;
$this->title = get_string('pluginname', 'block_blog_tags');
}
......
<?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_calendar_month extends block_base {
function init() {
$this->title = get_string('pluginname', 'block_calendar_month');
$this->version = 2007101509;
}
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 = 2007101509;
......@@ -3,7 +3,6 @@
class block_calendar_upcoming extends block_base {
function init() {
$this->title = get_string('pluginname', 'block_calendar_upcoming');
$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;
......@@ -6,7 +6,6 @@ class block_comments extends block_base {
function init() {
$this->title = get_string('pluginname', 'block_comments');
$this->version = 2009072000;
}
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 = 2009072000;
......@@ -27,7 +27,6 @@
class block_community extends block_list {
function init() {
$this->title = get_string('pluginname', 'block_community');
$this->version = 2010042701;
}
function user_can_addto($page) {
......
<?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 = 2010042701;
......@@ -34,7 +34,6 @@ class block_completionstatus extends block_base {
public function init() {
$this->title = get_string('completionstatus', 'block_completionstatus');
$this->version = 2009072800;
}
public function get_content() {
......
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