Add level schema primerLanguage

For web-dev 2 course in the short term
This commit is contained in:
Matt Lott 2016-08-11 06:08:58 -07:00
parent 1436b6e2a3
commit eaddf2fa8d
6 changed files with 8 additions and 2 deletions

View file

@ -66,7 +66,8 @@ _.extend CampaignSchema.properties, {
original: { type: 'string', format: 'hidden' }
adventurer: { type: 'boolean' }
practice: { type: 'boolean' }
practiceThresholdMinutes: {type: 'number'}
practiceThresholdMinutes: { type: 'number' }
primerLanguage: { type: 'string', enum: ['javascript', 'python'] }
shareable: { title: 'Shareable', type: ['string', 'boolean'], enum: [false, true, 'project'], description: 'Whether the level is not shareable, shareable, or a sharing-encouraged project level.' }
adminOnly: { type: 'boolean' }
disableSpaces: { type: ['boolean','number'] }

View file

@ -25,6 +25,7 @@ _.extend ClassroomSchema.properties,
levels: c.array { title: 'Levels' }, c.object { title: 'Level' }, {
practice: {type: 'boolean'}
practiceThresholdMinutes: {type: 'number'}
primerLanguage: { type: 'string', enum: ['javascript', 'python'] }
shareable: { title: 'Shareable', type: ['string', 'boolean'], enum: [false, true, 'project'], description: 'Whether the level is not shareable, shareable, or a sharing-encouraged project level.' }
type: c.shortString()
original: c.objectId()

View file

@ -330,6 +330,7 @@ _.extend LevelSchema.properties,
buildTime: {type: 'number', description: 'How long it has taken to build this level.'}
practice: { type: 'boolean' }
practiceThresholdMinutes: {type: 'number', description: 'Players with larger playtimes may be directed to a practice level.'}
primerLanguage: { type: 'string', enum: ['javascript', 'python'], description: 'Programming language taught by this level.' }
shareable: { title: 'Shareable', type: ['string', 'boolean'], enum: [false, true, 'project'], description: 'Whether the level is not shareable, shareable, or a sharing-encouraged project level.' }
# Admin flags

View file

@ -43,6 +43,7 @@ block content
th Practice
th Practice Threshold (m)
th Shareable
th Primer
each level, levelIndex in levels
- var levelNumber = campaign.getLevelNumber(level.get('original'), levelIndex + 1)
tr
@ -52,3 +53,4 @@ block content
td= level.get('practice')
td= level.get('practiceThresholdMinutes')
td= level.get('shareable')
td= level.get('primerLanguage')

View file

@ -16,7 +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', 'studentPlayInstructions'
'primerLanguage', 'shareable', 'studentPlayInstructions'
]
subscriptions:

View file

@ -69,6 +69,7 @@ LevelHandler = class LevelHandler extends Handler
'concepts'
'picoCTFProblem'
'practiceThresholdMinutes',
'primerLanguage'
'studentPlayInstructions'
]