mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-14 07:00:01 -04:00
Add level schema primerLanguage
For web-dev 2 course in the short term
This commit is contained in:
parent
1436b6e2a3
commit
eaddf2fa8d
6 changed files with 8 additions and 2 deletions
|
@ -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'] }
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -69,6 +69,7 @@ LevelHandler = class LevelHandler extends Handler
|
|||
'concepts'
|
||||
'picoCTFProblem'
|
||||
'practiceThresholdMinutes',
|
||||
'primerLanguage'
|
||||
'studentPlayInstructions'
|
||||
]
|
||||
|
||||
|
|
Loading…
Reference in a new issue