'update'
authorBenjamin Auder <benjamin.auder@somewhere>
Sun, 25 Feb 2018 09:37:45 +0000 (10:37 +0100)
committerBenjamin Auder <benjamin.auder@somewhere>
Sun, 25 Feb 2018 09:37:45 +0000 (10:37 +0100)
README.md
config/parameters.js.dist
models/user.js
public/javascripts/utils/validation.js

index 3de47b1..2b656b4 100644 (file)
--- 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/)<br/>
+  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/)<br/>
   The closest to my goals, but only for simple quizzes, and not actively developed anymore.
 
index a035134..d54dc83 100644 (file)
@@ -1,4 +1,4 @@
-var Parameters = {};
+var Parameters = { };
 
 // For mail sending. WARNING: *no trailing slash*
 Parameters.siteURL = "http://localhost";
index 4b66c88..f3acd1c 100644 (file)
@@ -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
                );
        },
index 96ed184..43bdd95 100644 (file)
@@ -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
        },