Commit f6893d7d authored by Piotr Gawron's avatar Piotr Gawron
Browse files

Merge branch 'annotators-issue' into 'master'

Annotators issue

See merge request minerva/core!680
parents 92cc6b26 fcb780d5
......@@ -547,6 +547,10 @@ ChooseAnnotatorsDialog.prototype.getParameterName = function (parameter) {
* @param {User} user
*/
ChooseAnnotatorsDialog.prototype.copyAnnotatorsToChildren = function (from, to, user) {
if (user.getPreferences()._elementAnnotators[from.className] === undefined) {
logger.warn("Cannot copy annotator from " + from.className + " to " + to.className + ". Annotators don't exist");
user.getPreferences()._elementAnnotators[from.className] = user.getPreferences()._elementAnnotators[to.className];
}
user.getPreferences()._elementAnnotators[to.className] = user.getPreferences()._elementAnnotators[from.className];
};
module.exports = ChooseAnnotatorsDialog;
......@@ -58,5 +58,9 @@ describe('UserPreferences', function () {
});
});
it("toExport", function () {
return ServerConnector.getLoggedUser().then(function (user) {
assert.ok(user.getPreferences().toExport());
})
});
});
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment