From: Benjamin Auder Date: Sun, 25 Feb 2018 09:37:45 +0000 (+0100) Subject: 'update' X-Git-Url: https://git.auder.net/app_dev.php/%7B%7B%20path%28%27mixstore_user_board%27%29%20%7D%7D?a=commitdiff_plain;h=ea8b41a9134cc20f8bd6e70326370319cab851ae;p=qomet.git 'update' --- diff --git a/README.md b/README.md index 3de47b1..2b656b4 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,10 @@ would be to force e.g. chromium in kiosk mode restricted to one domain (using SE Too big for my purpose; however qomet might be re-thought as a moodle plugin (although [at least one](https://moodle.org/plugins/mod_exam) already exists for this task). + * [nbgrader](http://nbgrader.readthedocs.io/en/stable/)
+ Assignment module for Jupyter, auto-grading closed and coding questions while providing a feedback to the students. + It looks great, but at least for the moment lacks the real-time review (for the teacher). + * [evalbox](https://evalbox.com/)
The closest to my goals, but only for simple quizzes, and not actively developed anymore. diff --git a/config/parameters.js.dist b/config/parameters.js.dist index a035134..d54dc83 100644 --- a/config/parameters.js.dist +++ b/config/parameters.js.dist @@ -1,4 +1,4 @@ -var Parameters = {}; +var Parameters = { }; // For mail sending. WARNING: *no trailing slash* Parameters.siteURL = "http://localhost"; diff --git a/models/user.js b/models/user.js index 4b66c88..f3acd1c 100644 --- a/models/user.js +++ b/models/user.js @@ -105,11 +105,10 @@ const UserModel = db.users.update( { _id: uid }, { $set: { loginToken: { - value: token, - timestamp: new Date().getTime(), - ip: ip, - }} - }, + value: token, + timestamp: new Date().getTime(), + ip: ip, + } } }, cb ); }, diff --git a/public/javascripts/utils/validation.js b/public/javascripts/utils/validation.js index 96ed184..43bdd95 100644 --- a/public/javascripts/utils/validation.js +++ b/public/javascripts/utils/validation.js @@ -1,4 +1,4 @@ -try { var _ = require("underscore"); } catch (err) {} //for server +try { var _ = require("underscore"); } catch (err) { } //for server let Validator = { }; @@ -82,8 +82,6 @@ Object.assign(Validator, { if (!model[key]) return "Unknown field"; - if (model[key] == "unchecked") //not a user input (ignored) - continue; if (_.isObject(model[key])) { // TODO: next loop seems too heavy... (only a concern if big class import?) @@ -112,6 +110,8 @@ Object.assign(Validator, "check_string": function(arg) { + if (!_.isString(arg)) + return "not a string"; return ""; //strings are unchecked, but sanitized },