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

Method userPlaytimeString

app/views/courses/ClassroomView.js:223–228  ·  view source on GitHub ↗
(user)

Source from the content-addressed store, hash-verified

221 }
222
223 userPlaytimeString (user) {
224 if (user.sessions == null) { return '' }
225 const playtime = _.reduce(user.sessions.pluck('playtime'), (s1, s2) => (s1 || 0) + (s2 || 0))
226 if (!playtime) { return '' }
227 return moment.duration(playtime, 'seconds').humanize()
228 }
229
230 classStats () {
231 const stats = {}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected