generate training sequence pt II

1. added determination of training parameters based on condition
2. added generation of training sequence (problem IDs, categories, trial
types)
3. still need to save/recover above info to/from database