mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-12-12 00:31:21 -05:00
Merge branch 'master' into production
This commit is contained in:
commit
091c062d67
6 changed files with 6 additions and 1 deletions
|
@ -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'}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -39,6 +39,7 @@ LevelHandler = class LevelHandler extends Handler
|
|||
'requiresSubscription'
|
||||
'adventurer'
|
||||
'practice'
|
||||
'shareable'
|
||||
'adminOnly'
|
||||
'disableSpaces'
|
||||
'hidesSubmitUntilRun'
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue