mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
Fixed some upgrading bugs
This commit is contained in:
parent
be27364137
commit
d175966b68
@ -1594,9 +1594,9 @@ function assignment_upgrade_submodules() {
|
||||
|
||||
$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;
|
||||
|
||||
@ -1605,7 +1605,6 @@ function assignment_upgrade_submodules() {
|
||||
if (!is_readable($fullpath .'/version.php')) {
|
||||
continue;
|
||||
}
|
||||
unset($module);
|
||||
include_once($fullpath .'/version.php');
|
||||
|
||||
/// Check whether we need to upgrade
|
||||
@ -1616,7 +1615,7 @@ function assignment_upgrade_submodules() {
|
||||
|
||||
/// 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");
|
||||
continue;
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
// This fragment is called by /admin/index.php
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
$module->version = 2005041800;
|
||||
$module->version = 2005051706;
|
||||
$module->requires = 2005031000; // Requires this Moodle version
|
||||
$module->cron = 60;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user