2015-08-29 10:15:35 -04:00
|
|
|
c = require './../schemas'
|
|
|
|
|
2015-11-03 14:18:44 -05:00
|
|
|
CourseInstanceSchema = c.object {
|
|
|
|
title: 'Course Instance'
|
|
|
|
required: [
|
|
|
|
'courseID', 'classroomID', 'members', 'ownerID', 'aceConfig'
|
|
|
|
]
|
|
|
|
}
|
2015-08-29 10:15:35 -04:00
|
|
|
|
|
|
|
_.extend CourseInstanceSchema.properties,
|
2015-09-03 14:04:40 -04:00
|
|
|
courseID: c.objectId()
|
2015-11-03 14:18:44 -05:00
|
|
|
classroomID: c.objectId()
|
|
|
|
description: {type: 'string'} # deprecated in favor of classrooms?
|
2015-08-29 10:15:35 -04:00
|
|
|
members: c.array {title: 'Members'}, c.objectId()
|
2015-11-03 14:18:44 -05:00
|
|
|
name: {type: 'string'} # deprecated in favor of classrooms?
|
2015-08-29 10:15:35 -04:00
|
|
|
ownerID: c.objectId()
|
2015-11-03 14:18:44 -05:00
|
|
|
prepaidID: c.objectId() # deprecated
|
2015-10-30 18:56:43 -04:00
|
|
|
aceConfig:
|
|
|
|
language: {type: 'string', 'enum': ['python', 'javascript']}
|
2015-08-29 10:15:35 -04:00
|
|
|
|
|
|
|
c.extendBasicProperties CourseInstanceSchema, 'CourseInstance'
|
|
|
|
|
|
|
|
module.exports = CourseInstanceSchema
|