aboutsummaryrefslogtreecommitdiff
path: root/node_simple.js
diff options
context:
space:
mode:
authorHumairAK <humair88@hotmail.com>2016-07-21 10:09:30 +0000
committerHumairAK <humair88@hotmail.com>2016-07-21 10:09:30 +0000
commit7f385f73ebc024e2c07e628fc1500bcb21b69837 (patch)
tree0363ad066c3d8654469749bf3675fb3add83e556 /node_simple.js
parent68be8844ddc1e30e34745a0589fa3395ae6ec198 (diff)
added admin page, fixed some minor issues
Diffstat (limited to 'node_simple.js')
-rw-r--r--node_simple.js13
1 files changed, 0 insertions, 13 deletions
diff --git a/node_simple.js b/node_simple.js
index 1542b83..419495a 100644
--- a/node_simple.js
+++ b/node_simple.js
@@ -65,8 +65,6 @@ var uri = 'mongodb://general:assignment4@ds057862.mlab.com:57862/solutions_repo'
//****************************FUNCTIONS************************************************|
-
-
// this function returns an array where is element contains info for a particular question
// such as the question number (_id), number of solutions (count), and number of comments
// (comments). [ {_id,count,comments}, {} ...]
@@ -113,8 +111,6 @@ exports.get_exam_info_by_ID = function (exam_id, callback) {
}
-
-
exports.add_comment = function (sol_id, fields) {
var Data = {
text: fields[0],
@@ -210,8 +206,6 @@ exports.add_solution = function (fields) {
}
-
-
/*
* This function will retrieve all exams in the database given the course code ...
* ... ordered by the year of the exam.
@@ -262,8 +256,6 @@ exports.get_all_exams = function (course_code, callback) {
}
-
-
/*
* This function will add an exam to the database UNLESS the exams already exists.
* If the exams table is empty, this will create one and then add the data.
@@ -334,7 +326,6 @@ exports.add_exam = function (fields, questions_array) {
});
}
-
/*
* This function will return TRUE if the provided exam info already exists in the database
* OR FALSE if it does not exist in the database.
@@ -388,7 +379,6 @@ exports.find_exam = function (fields, callback) {
});
}
-
/*
* This function will add a course to the database UNLESS the course already exists.
* If the course table is empty, this will create one and then add the data.
@@ -432,7 +422,6 @@ exports.add_course = function (course_code, title) {
});
}
-
/*
* This function will return TRUE if the provided course info already exists in the database
* OR FALSE if it does not exist in the database.
@@ -473,7 +462,6 @@ exports.find_course = function (course_code, callback) {
});
}
-
/*
* This function will remove the exam from the database given the combination of (course_code+ year + term + type)
* Params: fields - an array of format ["course_code", year, "term", "type"]
@@ -518,7 +506,6 @@ exports.remove_exam = function (fields) {
});
}
-
//get_exam_byID("578a44ff71ed097fc3079d6e");
exports.get_exam_byID = function (id) {