mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-28 18:15:52 -05:00
11 lines
495 B
JavaScript
11 lines
495 B
JavaScript
// Latest approved teacher trial requests
|
|
|
|
// Usage:
|
|
// mongo <address>:<port>/<database> <script file> -u <username> -p <password>
|
|
|
|
var requests = db.trial.requests.find().toArray();
|
|
function format(r) {
|
|
var p = r.properties;
|
|
return [r.created.getFullYear() + '-' + (r.created.getMonth() + 1) + '-' + r.created.getDate(), r.status, r.type, p.email, p.school, p.location, p.age, p.numStudents, p.heardAbout].join('\t').replace(/[\n\r]/g, ' ');
|
|
}
|
|
print(requests.map(format).join('\n'));
|