Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified database/database.sqlt
Binary file not shown.
1 change: 1 addition & 0 deletions public/js/questions.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ function displayQuestion(id){
starter = "#include<iostream>\n\nusing namespace std;\n\nint main(){\n cout << \"Hello World\"<< endl;\n return 0;\n}"
}
editor.setValue(starter);
editor.resize();
if(id === 0){
prev = false;
$("#prev").attr("disabled","");
Expand Down
2 changes: 1 addition & 1 deletion routes/student.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ module.exports = function (app, passport) {
let userProm = db.User.findById(req.session.passport.user.id);
Promise.all([examProm, userProm]).then(function (res1) {
//Create the submision ...
db.Submission.create({date_submitted:Date.now()}).then(function (sub) {
db.Submission.create({date_submitted:new Date()}).then(function (sub) {
res1[1].addSubmission(sub);
res1[0].addSubmission(sub);
let data = JSON.parse(req.body.submission);
Expand Down
2 changes: 1 addition & 1 deletion views/student_dashboard.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{{rules_stmt}}
</div>
<div class="mdl-card__actions mdl-card--border">
<a class="mdl-button mdl-button--colored mdl-js-button mdl-js-ripple-effect" href="/exam/take/1">
<a class="mdl-button mdl-button--colored mdl-js-button mdl-js-ripple-effect" href="/exam/take/{{id}}">
Take Exam
</a>
<a class="mdl-button mdl-button--colored mdl-js-button mdl-js-ripple-effect" href="/edit/exam/{{id}}">
Expand Down