MDL-53451 tool_lpmigrate: Keep course competency on module failure
When permissions are lacking and the course module competencies could not be migrated we must keep the course competency to preserve the original competency in the course module.
This commit is contained in:
@@ -543,6 +543,7 @@ class framework_processor {
|
||||
|
||||
} catch (moodle_exception $e) {
|
||||
// There was a major problem with this competency in this module.
|
||||
$competencieswithissues[$competencyid] = true;
|
||||
$message = get_string('errorwhilemigratingmodulecompetencywithexception', 'tool_lpmigrate',
|
||||
$e->getMessage());
|
||||
$this->log_error($courseid, $competencyid, $cmid, $message);
|
||||
@@ -564,6 +565,7 @@ class framework_processor {
|
||||
$this->modulecompetencyremovals++;
|
||||
}
|
||||
} catch (moodle_exception $e) {
|
||||
$competencieswithissues[$competencyid] = true;
|
||||
$this->log_warning($courseid, $competencyid, $cmid,
|
||||
get_string('warningcouldnotremovemodulecompetency', 'tool_lpmigrate'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user