MCPcopy
hub / github.com/learnhouse/learnhouse / commit

Method commit

apps/web/ee/services/scorm/ScormRuntimeAPI.ts:237–253  ·  view source on GitHub ↗

* Commit data to the backend

()

Source from the content-addressed store, hash-verified

235 * Commit data to the backend
236 */
237 async commit(): Promise<boolean> {
238 if (!this.isInitialized) {
239 this.lastError = this.scormVersion === 'SCORM_2004'
240 ? SCORM_2004_ERRORS.COMMIT_BEFORE_INITIALIZATION
241 : SCORM_12_ERRORS.NOT_INITIALIZED
242 return false
243 }
244
245 if (this.isTerminated) {
246 this.lastError = this.scormVersion === 'SCORM_2004'
247 ? SCORM_2004_ERRORS.COMMIT_AFTER_TERMINATION
248 : SCORM_12_ERRORS.GENERAL_EXCEPTION
249 return false
250 }
251
252 return this.commitToBackend()
253 }
254
255 /**
256 * Internal method to commit to backend

Callers 15

getScorm12APIMethod · 0.95
getScorm2004APIMethod · 0.95
log_usage_eventFunction · 0.80
create_usergroupFunction · 0.80
update_usergroup_by_idFunction · 0.80
delete_usergroup_by_idFunction · 0.80
add_users_to_usergroupFunction · 0.80

Calls 1

commitToBackendMethod · 0.95

Tested by 15

orgFunction · 0.64
other_orgFunction · 0.64
admin_roleFunction · 0.64
user_roleFunction · 0.64
admin_userFunction · 0.64
regular_userFunction · 0.64
courseFunction · 0.64
chapterFunction · 0.64
activityFunction · 0.64
collectionFunction · 0.64