MCPcopy Create free account
hub / github.com/codecombat/codecombat / setHocOptions

Function setHocOptions

ozaria/site/store/StudentAuthStoreModule.js:99–111  ·  view source on GitHub ↗
({ state, commit, dispatch })

Source from the content-addressed store, hash-verified

97 }
98 },
99 async setHocOptions ({ state, commit, dispatch }) {
100 const saveOptions = {}
101 if (state.isHourOfCode) {
102 saveOptions.hourOfCode = true
103 saveOptions.hourOfCode2019 = true
104 saveOptions.hourOfCodeOptions = _.assign({}, me.get('hourOfCodeOptions'))
105 saveOptions.hourOfCodeOptions.showHocProgress = true
106 saveOptions.hourOfCodeOptions.hocCodeLanguage = 'python' // default language
107 }
108 await dispatch('me/save', saveOptions, {
109 root: true
110 })
111 }
112 }
113}

Callers

nothing calls this directly

Calls 2

dispatchFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected