codecombat/app/schemas/models/classroom.schema.coffee
Matt Lott d72e4eb750 Practice levels Ux and next level algorithm
Update classroom and gameplay Ux to surface practice levels as 3a, 3b,
etc.
Update next level logic to leverage practice levels based on per level
completion playtime thresholds.
Patrol buster and patrol buster A are live for testing.
Fix a few classroom Ux progress hover bubble info bugs.

Closes #3767
2016-06-27 14:05:42 -07:00

37 lines
1.3 KiB
CoffeeScript

c = require './../schemas'
ClassroomSchema = c.object {title: 'Classroom', required: ['name']}
c.extendNamedProperties ClassroomSchema # name first
_.extend ClassroomSchema.properties,
name: { type: 'string', minLength: 1 }
members: c.array {title: 'Members'}, c.objectId()
deletedMembers: c.array {title: 'Deleted Members'}, c.objectId()
ownerID: c.objectId()
description: {type: 'string'}
code: c.shortString(title: "Unique code to redeem")
codeCamel: c.shortString(title: "UpperCamelCase version of code for display purposes")
aceConfig:
language: {type: 'string', 'enum': ['python', 'javascript']}
averageStudentExp: { type: 'string' }
ageRangeMin: { type: 'string' }
ageRangeMax: { type: 'string' }
archived:
type: 'boolean'
default: false
description: 'Visual only; determines if the classroom is in the "archived" list of the normal list.'
courses: c.array { title: 'Courses' }, c.object { title: 'Course' }, {
_id: c.objectId()
levels: c.array { title: 'Levels' }, c.object { title: 'Level' }, {
practice: {type: 'boolean'}
practiceThresholdMinutes: {type: 'number'}
type: c.shortString()
original: c.objectId()
name: {type: 'string'}
slug: {type: 'string'}
}
}
c.extendBasicProperties ClassroomSchema, 'Classroom'
module.exports = ClassroomSchema