mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Fixed some upgrading bugs
This commit is contained in:
parent
be27364137
commit
d175966b68
2 changed files with 4 additions and 5 deletions
|
@ -1594,9 +1594,9 @@ function assignment_upgrade_submodules() {
|
||||||
|
|
||||||
$types = assignment_types();
|
$types = assignment_types();
|
||||||
|
|
||||||
include_once($CFG->dirroot.'/mod/assignment/version.php'); // defines $module with version etc
|
include($CFG->dirroot.'/mod/assignment/version.php'); // defines $module with version etc
|
||||||
|
|
||||||
foreach ($types as $type) {
|
foreach ($types as $type => $typename) {
|
||||||
|
|
||||||
$fullpath = $CFG->dirroot.'/mod/assignment/type/'.$type;
|
$fullpath = $CFG->dirroot.'/mod/assignment/type/'.$type;
|
||||||
|
|
||||||
|
@ -1605,7 +1605,6 @@ function assignment_upgrade_submodules() {
|
||||||
if (!is_readable($fullpath .'/version.php')) {
|
if (!is_readable($fullpath .'/version.php')) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
unset($module);
|
|
||||||
include_once($fullpath .'/version.php');
|
include_once($fullpath .'/version.php');
|
||||||
|
|
||||||
/// Check whether we need to upgrade
|
/// Check whether we need to upgrade
|
||||||
|
@ -1616,7 +1615,7 @@ function assignment_upgrade_submodules() {
|
||||||
|
|
||||||
/// Make sure this submodule will work with this assignment version
|
/// Make sure this submodule will work with this assignment version
|
||||||
|
|
||||||
if (isset($submodule->requires) and ($submodules->requires > $module->version)) {
|
if (isset($submodule->requires) and ($submodule->requires > $module->version)) {
|
||||||
notify("Assignment submodule '$type' is too new for your assignment");
|
notify("Assignment submodule '$type' is too new for your assignment");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
// This fragment is called by /admin/index.php
|
// This fragment is called by /admin/index.php
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
$module->version = 2005041800;
|
$module->version = 2005051706;
|
||||||
$module->requires = 2005031000; // Requires this Moodle version
|
$module->requires = 2005031000; // Requires this Moodle version
|
||||||
$module->cron = 60;
|
$module->cron = 60;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue