Skip to content

Commit

Permalink
fix upgrade.php (#30)
Browse files Browse the repository at this point in the history
fix
  • Loading branch information
Glutamat42 authored Sep 20, 2024
1 parent 91844da commit bda4e1e
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ function xmldb_local_adler_upgrade($oldversion): bool {
// $dbman = $DB->get_manager(); // Loads ddl manager and xmldb classes.

if ($oldversion < 2024090900) {
$success = true;
try {
$courses = get_courses('all');
foreach ($courses as $course) {
if ($course->id == 1) {
Expand All @@ -26,16 +24,12 @@ function xmldb_local_adler_upgrade($oldversion): bool {
// Do nothing
}
}
} catch (moodle_exception $e) {
// $success = false;
throw $e;
}

// Logging the upgrade.
upgrade_plugin_savepoint($success, 2024090900, 'local', 'adler');
upgrade_plugin_savepoint(true, 2024090900, 'local', 'adler');

}

// Everything has succeeded to here. Return true.
return true;
}
}

0 comments on commit bda4e1e

Please sign in to comment.