MDL-40223 SCORM: pass limit into function instead of hardcoding to allow cross-db