mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
Fixed problem with cmi.interactions.id elements' duplicated ids.
This commit is contained in:
parent
d022bf655e
commit
1a3dad3484
@ -556,10 +556,30 @@ alert('element = '+element+"\nsubelement = "+subelement+"\nparentmodel = "+paren
|
||||
parentmodel = 'cmi.interactions';
|
||||
if (subelement.substr(0,parentmodel.length) == parentmodel) {
|
||||
if ((elementmodel==parentmodel+'.n.id') && (errorCode=="0")) {
|
||||
if (eval(element) == value) {
|
||||
errorCode = "351";
|
||||
diagnostic = "Write Once Violation";
|
||||
}
|
||||
elementIndexesSubindex = element.split('.');
|
||||
elementFirstind = elementIndexesSubindex [2];
|
||||
len = elementFirstind.length;
|
||||
|
||||
len--;
|
||||
if (len == 1){
|
||||
|
||||
ind = elementFirstind.substring(1);
|
||||
}
|
||||
else{
|
||||
ind = elementFirstind.substring(1,len);
|
||||
}
|
||||
|
||||
i=0;
|
||||
while (i<parseInt(ind)){
|
||||
elem = 'cmi.interactions.N'+ind+'.id';
|
||||
if (eval(elem)==value){
|
||||
errorCode = "351";
|
||||
diagnostic = "Write Once Violation";
|
||||
}
|
||||
else{
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (elementmodel=='cmi.interactions.n.objectives.n.id') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user