aboutsummaryrefslogtreecommitdiff
path: root/routes/index.js
diff options
context:
space:
mode:
authorHumairAK <humair88@hotmail.com>2016-07-25 03:16:38 +0000
committerHumairAK <humair88@hotmail.com>2016-07-25 03:16:38 +0000
commitfc3cc6aee7ce7a28539d332902c0f9923d298c71 (patch)
treed7ed316afc867a33c93e7f6d8063df4c3fd17109 /routes/index.js
parent482401fa5777b910b099f96b0abdadf1d4cfa54c (diff)
added all admin panel functionality
Diffstat (limited to 'routes/index.js')
-rw-r--r--routes/index.js15
1 files changed, 0 insertions, 15 deletions
diff --git a/routes/index.js b/routes/index.js
index 23cd7c3..698305b 100644
--- a/routes/index.js
+++ b/routes/index.js
@@ -29,12 +29,6 @@ router.get('/user_solutions', function(req, res, next) {
res.render('user_solutions');
});
-/* Render/GET questions page
-router.get('/questions', function(req, res, next) {
- res.render('questions');
-});
-*/
-
//EXAMPLE EXPECTED DATA GIVEN BELOW:
/*[ {courseCode: 'CSC240',
year: 2016,
@@ -137,13 +131,6 @@ router.get('/questions/:exam_id', function (req,res) {
res.render('questions', {query: qList, examInfo: examInfo});
});
});
-
- /*dbFile.get_exam_info_by_ID(examID, function (questions) {
- console.log(questions);
- res.render('questions', {query: questions});
-
- });*/
-
});
/*GET the solutions for a given exam given the question number and the exam_id
@@ -182,11 +169,9 @@ router.get('/questions/:exam_id', function (req,res) {
*/
router.get('/solutions/:exam_id/:q_num', function (req, res) {
- console.log("index.js::Getting solutions");
var examID = req.params.exam_id;
var qID = req.params.q_num;
dbFile.get_all_solutions(examID, qID, function (solutions) {
- console.log("index.js::GOT solutions");
solutions.forEach(function(soln){
soln.commentCount = soln.comments.length;
});