2015-11-02 20:07:23 -05:00
c = require ' ./../schemas '
ClassroomSchema = c . object { title: ' Classroom ' , required: [ ' name ' ] }
c . extendNamedProperties ClassroomSchema # name first
_ . extend ClassroomSchema . properties ,
2016-04-07 17:55:42 -04:00
name: { type: ' string ' , minLength: 1 }
2015-11-02 20:07:23 -05:00
members: c . array { title: ' Members ' } , c . objectId ( )
2016-04-07 17:55:42 -04:00
deletedMembers: c . array { title: ' Deleted Members ' } , c . objectId ( )
2015-11-02 20:07:23 -05:00
ownerID: c . objectId ( )
description: { type: ' string ' }
code: c . shortString ( title: " Unique code to redeem " )
2015-11-22 10:47:28 -05:00
codeCamel: c . shortString ( title: " UpperCamelCase version of code for display purposes " )
2015-11-17 19:09:29 -05:00
aceConfig:
language: { type: ' string ' , ' enum ' : [ ' python ' , ' javascript ' ] }
2016-03-30 16:57:19 -04:00
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. '
2016-04-13 12:54:24 -04:00
courses: c . array { title: ' Courses ' } , c . object { title: ' Course ' } , {
_id: c . objectId ( )
levels: c . array { title: ' Levels ' } , c . object { title: ' Level ' } , {
2016-06-26 16:51:14 -04:00
practice: { type: ' boolean ' }
practiceThresholdMinutes: { type: ' number ' }
2016-08-11 09:08:58 -04:00
primerLanguage: { type: ' string ' , enum: [ ' javascript ' , ' python ' ] }
2016-07-16 02:26:43 -04:00
shareable: { title: ' Shareable ' , type: [ ' string ' , ' boolean ' ] , enum: [ false , true , ' project ' ] , description: ' Whether the level is not shareable, shareable, or a sharing-encouraged project level. ' }
2016-04-13 12:54:24 -04:00
type: c . shortString ( )
original: c . objectId ( )
name: { type: ' string ' }
slug: { type: ' string ' }
}
}
2015-11-02 20:07:23 -05:00
c . extendBasicProperties ClassroomSchema , ' Classroom '
module.exports = ClassroomSchema