Fixed some version numbers on three blocks

This commit is contained in:
moodler 2004-08-12 04:44:14 +00:00
parent d8b94c7d26
commit 9fb216e8b6
7 changed files with 22 additions and 4 deletions

View File

@ -5,7 +5,7 @@ class CourseBlock_admin extends MoodleBlock {
$this->title = get_string('administration');
$this->content_type = BLOCK_TYPE_LIST;
$this->course = $course;
$this->version = 2005052800;
$this->version = 2004081200;
}
function applicable_formats() {

View File

@ -5,7 +5,7 @@ class CourseBlock_calendar_month extends MoodleBlock {
$this->title = get_string('calendar', 'calendar');
$this->content_type = BLOCK_TYPE_TEXT;
$this->course = $course;
$this->version = 2005052600;
$this->version = 2004081200;
}
function applicable_formats() {

View File

@ -5,7 +5,7 @@ class CourseBlock_course_list extends MoodleBlock {
$this->title = get_string('courses');
$this->content_type = BLOCK_TYPE_LIST;
$this->course = $course;
$this->version = 2005052600;
$this->version = 2004081200;
}
function has_config() {

View File

@ -24,6 +24,11 @@ function course_list_upgrade($oldversion=0) {
$result = true;
if ($oldversion == 2005052600) { /// Fix a buggy date
$oldversion = 2004081200;
set_field();
}
if ($oldversion < 2004041000 and $result) {
$result = true; //Nothing to do
}

View File

@ -801,6 +801,13 @@ function main_upgrade($oldversion=0) {
}
}
if ($oldversion < 2004081200) { // Fixing version errors in some blocks
set_field('blocks', 'version', 2004081200, 'name', 'admin');
set_field('blocks', 'version', 2004081200, 'name', 'calendar_month');
set_field('blocks', 'version', 2004081200, 'name', 'course_list');
}
return $result;
}

View File

@ -543,6 +543,12 @@ function main_upgrade($oldversion=0) {
}
}
if ($oldversion < 2004081200) { // Fixing version errors in some blocks
set_field('blocks', 'version', 2004081200, 'name', 'admin');
set_field('blocks', 'version', 2004081200, 'name', 'calendar_month');
set_field('blocks', 'version', 2004081200, 'name', 'course_list');
}
return $result;

View File

@ -5,7 +5,7 @@
// database to determine whether upgrades should
// be performed (see lib/db/*.php)
$version = 2004080300; // The current version is a date (YYYYMMDDXX)
$version = 2004081200; // The current version is a date (YYYYMMDDXX)
$release = "1.4 development"; // User-friendly version number