Hints per lesson (#314)

Squashing and merging ...

* Each assigment should have the options to have its own set of hints #278

* Updating lessons due to changes from #278

* Enable i18n client side #312

* IDOR move hints to assignment and enable i18n #312
This commit is contained in:
Nanne Baars
2017-01-24 15:34:06 +01:00
committed by misfir3
parent 6d727b98e3
commit 0779f7a3d0
56 changed files with 488 additions and 367 deletions

View File

@ -1,7 +1,7 @@
define(['jquery',
'underscore',
'backbone',
'goatApp/model/HintModel'],
'goatApp/model/HintModel'],
function($,
_,
@ -25,8 +25,17 @@ define(['jquery',
checkNullModel:function() {
if (this.models[0].indexOf('There are no hints defined.') > -1) {
this.reset([]);
//return this.models;
}
},
getHintsForAssignment: function(assignmentPath) {
var assignmentHints = new Array();
this.models.forEach(function(hint) {
if (assignmentPath.includes(hint.get('assignmentPath'))) {
assignmentHints.push(hint);
}
});
return assignmentHints;
}
});
});