Skip to content

Latest commit

 

History

History
117 lines (112 loc) · 2.34 KB

schema.md

File metadata and controls

117 lines (112 loc) · 2.34 KB

#WeBWorK Request/Response Schemas This is the Schema for the standard objects WeBWorK deals with. Any back end will have to implement an ORM so that it can speak the same language. In some cases, such as Mongo, Couch, and other JSON stores, there's a good chance that the mapping will come for free.

##User

{
  id: String,
  first_name: String,
  last_name: String,
  email: String,
  login_id: String,  // or pehaps its better to just use the email.
  hashed_password: String,
  salt: Number,
}

##ProblemSet references ProblemPool, UserSetProperty, GlobalSetProperty

{
  id: String,
  set_name: String,
  problems: [ProblemPool],
  users_properties: [UserSetProperty],
  course_properties: GlobalSetProperty,
}

##Course references User, ProblemSet

{
  id: String,
  course_name: String,
  users: [User],
  problem_sets: [ProblemSet],
}

##SetProperty

{
  open_date: Date,
  reduced_credit_date: Date,
  due_date: Date,
  answer_date: Date,
}

##GlobalSetProperty extends SetProperty

{

}

##UserSetProperty extends SetProperty

{
  user: user_id
}

##HomeworkSet extends ProblemSet

{

}

##GatewayQuiz extends ProblemSet

{

}

##AdaptiveProblemSet extends ProblemSet // this is a seqence of problems that require the student to go in order.

{
  dependencies: [String], // this will be an Array of problem_ids that each problem depends on.  
}

##ProblemPool references Problem

{
  id: String,
  pool: [Problem]
}

##Problem

{
  id: String,
  name: String,
  index: Number, // (or int) 
  weight: Number, // the maximum value
  source: String, // the path or an id if we switch to a database of problems. 
}

##Library references LibraryProblem

{
  name: String,
  problems: [LibraryProblem]
}

##LibraryProblem references Textbook

{
  path: String,
  subject: String,
  chapter: String,
  section: String,
  author: String,
  date_created: Date,
  date_last_modified: Date,
  institution: String,
  text_origin: Textbook
}