Finalizing changes to initial data load
This commit is contained in:
@@ -550,7 +550,8 @@ export default class BaseAPI {
|
||||
} else if (!this._checkObjectHasProperty(refObject, attribute)) {
|
||||
this.throwSCORMError(invalidErrorCode, invalidErrorMessage);
|
||||
} else {
|
||||
if (this.stringMatches(CMIElement, '\\.correct_responses\\.\\d+')) {
|
||||
if (this.isInitialized() &&
|
||||
this.stringMatches(CMIElement, '\\.correct_responses\\.\\d+')) {
|
||||
this.validateCorrectResponse(CMIElement, value);
|
||||
}
|
||||
|
||||
|
||||
@@ -395,7 +395,8 @@ export class CMI extends BaseCMI {
|
||||
* @param {string} session_time
|
||||
*/
|
||||
set session_time(session_time) {
|
||||
if (check2004ValidFormat(session_time, scorm2004_regex.CMITimespan)) {
|
||||
if (this.initialized &&
|
||||
check2004ValidFormat(session_time, scorm2004_regex.CMITimespan)) {
|
||||
this.#session_time = session_time;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user