diff options
| author | nanalelfe <nargiza.nosirova@mail.utoronto.ca> | 2016-07-20 21:11:59 +0000 |
|---|---|---|
| committer | nanalelfe <nargiza.nosirova@mail.utoronto.ca> | 2016-07-20 21:11:59 +0000 |
| commit | d46b37fcb7c97ab59fd929cfc0a8d766ca8a0b8a (patch) | |
| tree | 3b51e4c196bacd7c4524e8dbdb472a0e972aac8c /testImports.js | |
| parent | 3d2f0e48def5b314121f7315ada1008f6801fa2b (diff) | |
| parent | 7a9c0a4732ba720fba72be06dcafa0dbbf26022b (diff) | |
Merged
Diffstat (limited to 'testImports.js')
| -rw-r--r-- | testImports.js | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/testImports.js b/testImports.js index fc128eb..c9f0bb2 100644 --- a/testImports.js +++ b/testImports.js @@ -17,17 +17,38 @@ var questions_array = ["this is q1", "this is q2"]; //test getting all exams database functionality -- USE FOR THE EXAMS PAGES maybe? -dbFile.get_all_exams("CSC240", function (exams) { +/*dbFile.get_all_exams("CSC240", function (exams) { if (exams.length == 0){ console.log("Nothing was found"); } else { console.log(exams); } -}); +});*/ //test adding course // dbFile.add_course("CSC148", "Intro to Programming"); //test adding solution -//dbFile.add_solution(["578a44ff71ed097fc3079d6e", 1, "this is another solution to q1"]); +//dbFile.add_solution(["578a44ff71ed097fc3079d6e", 2, "this is a solution to q2"]); + + +// the following just prints the exam to console +// dbFile.get_exam_byID("578a44ff71ed097fc3079d6e"); + +//test getting all solutions of a given exam and question number +//dbFile.get_all_solutions("578a44ff71ed097fc3079d6e", 1); + + +//test adding of comments given a solution_id, and the comment information as an array +// dbFile.add_comment("578f08e43bba452ee98da444", ["this is asdfasdf", "this is the date", "this is the author"]); + + +dbFile.get_exam_info_by_ID("578a44ff71ed097fc3079d6e", function (result) { + if (result.length == 0) { + console.log("some error occured"); + } + else { + console.log(result); + } +});
\ No newline at end of file |
