({ state, commit, dispatch })
| 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 | } |