MDL-53700 competency: Making CiBoT happier

This commit is contained in:
Frederic Massart
2016-04-18 11:06:00 +08:00
parent 8d0c57ed08
commit 91e5464282
20 changed files with 219 additions and 184 deletions
@@ -464,8 +464,8 @@ class framework_processor {
$competenciestoremovefromcourse[$competencyid] = true;
$this->coursecompetencymigrations++;
// The competency was already in the course...
} else {
// The competency was already in the course...
if ($this->removeoriginalwhenalreadypresent) {
$competenciestoremovefromcourse[$competencyid] = true;
} else {
@@ -474,8 +474,8 @@ class framework_processor {
}
}
// There was a major problem with this competency, we will ignore it entirely for the course.
} catch (moodle_exception $e) {
// There was a major problem with this competency, we will ignore it entirely for the course.
$skipcompetencies[$competencyid] = true;
$this->log_error($courseid, $competencyid, null,
@@ -512,8 +512,8 @@ class framework_processor {
$remove = false;
}
// We have a mapping.
} else {
// We have a mapping.
$transaction = $DB->start_delegated_transaction();
try {
// The competency was added successfully.
@@ -531,8 +531,8 @@ class framework_processor {
$this->modulecompetencymigrations++;
// The competency was already in the module.
} else {
// The competency was already in the module.
if (!$this->removeoriginalwhenalreadypresent) {
$remove = false;
$competencieswithissues[$competencyid] = true;
@@ -541,8 +541,8 @@ class framework_processor {
}
}
// There was a major problem with this competency in this module.
} catch (moodle_exception $e) {
// There was a major problem with this competency in this module.
$message = get_string('errorwhilemigratingmodulecompetencywithexception', 'tool_lpmigrate',
$e->getMessage());
$this->log_error($courseid, $competencyid, $cmid, $message);