Merge branch 'master' into production

This commit is contained in:
phoenixeliot 2016-07-14 16:38:33 -07:00
commit 091c062d67
6 changed files with 6 additions and 1 deletions

View file

@ -25,6 +25,7 @@ _.extend ClassroomSchema.properties,
levels: c.array { title: 'Levels' }, c.object { title: 'Level' }, {
practice: {type: 'boolean'}
practiceThresholdMinutes: {type: 'number'}
shareable: {type: 'boolean'}
type: c.shortString()
original: c.objectId()
name: {type: 'string'}

View file

@ -325,6 +325,7 @@ _.extend LevelSchema.properties,
replayable: {type: 'boolean', title: 'Replayable', description: 'Whether this (hero) level infinitely scales up its difficulty and can be beaten over and over for greater rewards.'}
buildTime: {type: 'number', description: 'How long it has taken to build this level.'}
practice: { type: 'boolean' }
shareable: { type: 'boolean', title: 'Shareable' }
practiceThresholdMinutes: {type: 'number', description: 'Players with larger playtimes may be directed to a practice level.'}
# Admin flags

View file

@ -16,6 +16,7 @@ module.exports = class SettingsTabView extends CocoView
'name', 'description', 'documentation', 'nextLevel', 'background', 'victory', 'i18n', 'icon', 'goals',
'type', 'terrain', 'showsGuide', 'banner', 'employerDescription', 'loadingTip', 'requiresSubscription',
'helpVideos', 'replayable', 'scoreTypes', 'concepts', 'picoCTFProblem', 'practice', 'practiceThresholdMinutes'
'shareable'
]
subscriptions:

View file

@ -136,6 +136,7 @@ class SimulatorsLeaderboardData extends CocoClass
return me.id in (user.id for user in @topSimulators.models)
nearbySimulators: ->
return [] if not @playersAbove?.models
l = []
above = @playersAbove.models
l = l.concat(above)

View file

@ -39,6 +39,7 @@ LevelHandler = class LevelHandler extends Handler
'requiresSubscription'
'adventurer'
'practice'
'shareable'
'adminOnly'
'disableSpaces'
'hidesSubmitUntilRun'

View file

@ -154,7 +154,7 @@ module.exports =
levels = _.sortBy(levels, 'campaignIndex')
for level in levels
levelData = { original: mongoose.Types.ObjectId(level.original) }
_.extend(levelData, _.pick(level, 'type', 'slug', 'name', 'practice', 'practiceThresholdMinutes'))
_.extend(levelData, _.pick(level, 'type', 'slug', 'name', 'practice', 'practiceThresholdMinutes', 'shareable'))
courseData.levels.push(levelData)
coursesData.push(courseData)
classroom.set('courses', coursesData)