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

Method isInHourOfCode

app/models/User.js:343–349  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

341 }
342
343 isInHourOfCode () {
344 if (!this.get('hourOfCode')) { return false }
345 const daysElapsed = (new Date() - new Date(this.get('dateCreated'))) / (86400 * 1000)
346 if (daysElapsed > 7) { return false } // Disable special HoC handling after a week, treat as normal users after that point
347 if ((daysElapsed > 1) && this.get('hourOfCodeComplete')) { return false } // ... or one day, if they're already done with it
348 return true
349 }
350
351 async getClientCreatorPermissions () {
352 let clientID = this.get('clientCreator')

Callers 4

onLoadedMethod · 0.80
afterInsertMethod · 0.80
annotateLevelsMethod · 0.80
onClickSignupButtonMethod · 0.80

Calls 1

getMethod · 0.95

Tested by

no test coverage detected