adaptlearning / adapt_framework

A toolkit for creating responsive, accessible, multilanguage HTML5 e-learning courses.
https://www.adaptlearning.org/
GNU General Public License v3.0
578 stars 248 forks source link

adapt-contrib-assessment: throwing errors in IE8 #1432

Closed moloko closed 7 years ago

moloko commented 7 years ago

The function _setupBankedAssessment in adapt-assessmentArticleModel.js is throwing 'Object does not support this property or method' errors in IE8

Seems to be down to the ES5-shim for IE8 having added some additional methods (like indexOf, reduce, etc.) to the Array prototype - and so the for...in loop within _setupBankedAssessment is trying to enumerate over these.

Adding if(this._questionBanks.hasOwnProperty(bankId)) should fix this

moloko commented 7 years ago

done via https://github.com/adaptlearning/adapt-contrib-assessment/commit/194458284699701a05477932c4f7b4fddad66654