This shows you the differences between two versions of the page.
stats:proc:createemptystats [2011/09/28 21:54] Patrick Michel |
stats:proc:createemptystats [2013/07/10 12:39] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Create Empty Stat System ====== | ||
- | |||
- | <code xcend> | ||
- | createEmptyStats() { | ||
- | remove /stats; # procedures only operate on valid documents, so we have to get rid of "whatever was there" before | ||
- | insert / | ||
- | <stats> | ||
- | <accounts> | ||
- | <account username="admin" lastName="admin" firstName="admin" email="admin@stats.system" password="some hash of 'admin'"> | ||
- | <admin /> | ||
- | </account> | ||
- | </accounts> | ||
- | <exercises /> | ||
- | <exams /> | ||
- | </stats>; | ||
- | } | ||
- | </code> | ||